PROT_WRITE implies PROT_READ, fixing mmap05 ltp test

Roman Divacky rdivacky at freebsd.org
Tue Jan 1 04:58:18 PST 2008


hi

in rev. 1.70 of i386/linux/linux_machdep.c you talk about:

revision 1.70
date: 2007/02/15 00:54:40;  author: jkim;  state: Exp;  lines: +58 -54
MFP4: 113025, 113146, 113177, 113203, 113500, 113546, 113570

- PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC.
Linux/ia64's i386 emulation layer does this and it complies with Linux
header files.  This fixes mmap05 LTP test case on amd64.

I have a few questions:

1) did you verify that PROT_WRITE implies PROT_READ in linux/i386? I didnt
find any such place, only a comment in ia64 ia32 emulation talking about this.
I think the ia64 might be wrong (does anybody uses ia32 emulation on ia64 at all?)

2) the mmap05 tests tries to mmap() file with PROT_NONE prot. how is implying 
PROT_READ when PROT_WRITE going to help that?

in the real i386 linux the only thing I see is that PROT_READ implies PROT_EXEC. 
nothing more.

thnx

roman




More information about the freebsd-emulation mailing list