Opened 2 years ago
Last modified 2 years ago
#17895 closed bug
mprotect ineffective after fork — at Version 2
Reported by: | korli | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta4 |
Component: | System/Kernel | Version: | R1/beta3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
I took a few tests from libhugetlbfs, combined them in fork-mprotect-cow to check the page protection after fork. this actually succeeds on Linux and fails on Haiku.
Test output on Linux
Starting testcase "./fork-mprotect-cow", pid 15944 Mapping synchronization area..done Mapping hugepage area...mapped at 0x7f59034f2000 Parent writes pre-fork...1234abcd mprotect()ing to prot=0 Parent reading..SIGSEGV at 0x7f59034f2000 (sig_expected=0x7f59034f2000) -1 Child starts.. Child reading..SIGSEGV at 0x7f59034f2000 (sig_expected=0x7f59034f2000) -1 Child exits... PASS
Test output on Haiku
Starting testcase "./fork-mprotect-cow", pid 585 Mapping synchronization area..done Mapping hugepage area...mapped at 0x6e1872f000 Parent writes pre-fork...1234abcd mprotect()ing to prot=0 Parent reading..Read back 305441741 0 Child starts.. Child reading..SIGSEGV at 0x6e1872f000 (sig_expected=0x6e1872f000) -1 Child exits... FAIL Parent read succeeded on mmap(prot=0)
Change History (5)
by , 2 years ago
Attachment: | fork-mprotect-cow.c added |
---|
by , 2 years ago
Attachment: | testutils.c added |
---|
by , 2 years ago
Attachment: | hugetests.h added |
---|
comment:1 by , 2 years ago
Description: | modified (diff) |
---|
comment:2 by , 2 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.