https://github.com/torvalds/linux
Revision 8701ea957dd2a7c309e17c8dcde3a64b92d8aec0 authored by Jeremy Fitzhardinge on 22 December 2006, 09:11:21 UTC, committed by Linus Torvalds on 22 December 2006, 16:55:51 UTC
The PDA patches introduced a bug in ptrace: it reads eflags from the wrong
place on the target's stack, but writes it back to the correct place.  The
result is a corrupted eflags, which is most visible when it turns interrupts
off unexpectedly.

This patch fixes this by making the ptrace code a little less fragile.  It
changes [gs]et_stack_long to take a straightforward byte offset into struct
pt_regs, rather than requiring all callers to do a sizeof(struct pt_regs)
offset adjustment.  This means that the eflag's offset (EFL_OFFSET) on the
target stack can be simply computed with offsetof().

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Frederik Deweerdt <deweerdt@free.fr>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 7c7e942
History
Tip revision: 8701ea957dd2a7c309e17c8dcde3a64b92d8aec0 authored by Jeremy Fitzhardinge on 22 December 2006, 09:11:21 UTC
[PATCH] ptrace: Fix EFL_OFFSET value according to i386 pda changes
Tip revision: 8701ea9
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 572 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 88.5 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 75.5 KB
Makefile -rw-r--r-- 49.1 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top