summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-09-27 10:50:19 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 17:26:14 +0200
commitd00c7b993712e4bb16d0012b35b654e40159b327 (patch)
tree79f8fc60f8e41e054abc39b5d69e84d7a389777c /fs
parent[PATCH] NOMMU: Check VMA protections (diff)
downloadlinux-d00c7b993712e4bb16d0012b35b654e40159b327.tar.xz
linux-d00c7b993712e4bb16d0012b35b654e40159b327.zip
[PATCH] NOMMU: Permit ptrace to ignore non-PROT_WRITE VMAs in NOMMU mode
Permit ptrace to modify a section that's non-shared but is marked unwritable, such as is obtained by mapping the text segment of an ELF-FDPIC executable binary with into a binary that's being ptraced[*]. [*] Under NOMMU conditions ptrace causes read-only MAP_PRIVATE mmaps to become totally private copies because if a private mapping was actually shared then the debugging setting breakpoints in it would potentially crash other processes. This is done by using the VM_MAYWRITE flag rather than the VM_WRITE flag when deciding whether to permit a write. Without this patch a debugger can't set breakpoints in the mapped text sections of executables that are mapped read-only private, even if the mmap() syscall has taken a private copy because PT_PTRACED is set. In addition, VM_MAYREAD is used instead of VM_READ for similar reasons. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions