summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorChuck Ebbert <76306.1226@compuserve.com>2007-11-07 10:48:39 -0500
committerThomas Gleixner <tglx@apollo.(none)>2007-11-10 04:30:36 +0100
commitecd744eec3aa8bbc949ec04ed3fbf7ecb2958a0e (patch)
tree47c398a2e76b2354977df0d72ed91271ce85acf8 /drivers/mmc
parentfd181c72a3c202a3986bcee7551c0838265aec2a (diff)
downloadop-kernel-dev-ecd744eec3aa8bbc949ec04ed3fbf7ecb2958a0e.zip
op-kernel-dev-ecd744eec3aa8bbc949ec04ed3fbf7ecb2958a0e.tar.gz
x86 - 32-bit ptrace emulation mishandles 6th arg
[ jdike - Pushing Chuck's patch - see http://lkml.org/lkml/2005/9/16/261 for some history and a test program. UML is also broken without this patch - its processes get SIGBUS from the corrupt 6th argument to mmap being interpretted as a file offset ] When the 32-bit vDSO is used to make a system call, the %ebp register for the 6th syscall arg has to be loaded from the user stack (where it's pushed by the vDSO user code). The native i386 kernel always does this before stopping for syscall tracing, so %ebp can be seen and modified via ptrace to access the 6th syscall argument. The x86-64 kernel fails to do this, presenting the stack address to ptrace instead. This makes the %rbp value seen by 64-bit ptrace of a 32-bit process, and the %ebp value seen by a 32-bit caller of ptrace, both differ from the native i386 behavior. This patch fixes the problem by putting the word loaded from the user stack into %rbp before calling syscall_trace_enter, and reloading the 6th syscall argument from there afterwards (so ptrace can change it). This makes the behavior match that of i386 kernels. Original-Patch-By: Roland McGrath <roland@redhat.com> Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mmc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud