]> err.no Git - linux-2.6/commit
x86_64: ia32 ptrace THREAD_AREA fix
authorRoland McGrath <roland@redhat.com>
Tue, 6 Nov 2007 23:30:38 +0000 (15:30 -0800)
committerThomas Gleixner <tglx@apollo.(none)>
Sat, 10 Nov 2007 03:30:36 +0000 (04:30 +0100)
commitfd181c72a3c202a3986bcee7551c0838265aec2a
treeb07b0a662baaace2c5addfca77b537e1267e8d12
parent1a0c3ea65ca4838a803a14f0ff2bfc78aa69c9a0
x86_64: ia32 ptrace THREAD_AREA fix

The addr argument to PTRACE_GET_THREAD_AREA and PTRACE_SET_THREAD_AREA is
not a magic constant.  It's derived from the segment register values being
used, which are computed originally from the index used with set_thread_area.
The value does not need to match what a native i386 kernel would accept.
It needs to match the segment selectors that can actually be in use in this
32-bit process.  The 64-bit ptrace support for PTRACE_GET_THREAD_AREA
(normally used only on 32-bit processes) is correct, but the 32-bit emulation
of ptrace is broken.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/ia32/ptrace32.c