summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-21 20:29:45 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-10 00:36:12 +0900
commitcdd5479bf6cfbaf84308beda5b76037dbea471b1 (patch)
tree16c6262a359da4b5173c02dfbd208cfc004477dd /arch
parentfd62fa971584007e612be6e531101842de97715a (diff)
downloadlinux-3.10-cdd5479bf6cfbaf84308beda5b76037dbea471b1.tar.gz
linux-3.10-cdd5479bf6cfbaf84308beda5b76037dbea471b1.tar.bz2
linux-3.10-cdd5479bf6cfbaf84308beda5b76037dbea471b1.zip
x86, x32, ptrace: Remove PTRACE_ARCH_PRCTL for x32
commit bad1a753d4d4deb09d4bc0bac1dd4fc3298502e9 upstream. When I added x32 ptrace to 3.4 kernel, I also include PTRACE_ARCH_PRCTL support for x32 GDB For ARCH_GET_FS/GS, it takes a pointer to int64. But at user level, ARCH_GET_FS/GS takes a pointer to int32. So I have to add x32 ptrace to glibc to handle it with a temporary int64 passed to kernel and copy it back to GDB as int32. Roland suggested that PTRACE_ARCH_PRCTL is obsolete and x32 GDB should use fs_base and gs_base fields of user_regs_struct instead. Accordingly, remove PTRACE_ARCH_PRCTL completely from the x32 code to avoid possible memory overrun when pointer to int32 is passed to kernel. Link: http://lkml.kernel.org/r/CAMe9rOpDzHfS7NH7m1vmD9QRw8SSj4Sc%2BaNOgcWm_WJME2eRsQ@mail.gmail.com Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/ptrace.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 685845cf16e..cf1178332bc 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1211,12 +1211,6 @@ static long x32_arch_ptrace(struct task_struct *child,
0, sizeof(struct user_i387_struct),
datap);
- /* normal 64bit interface to access TLS data.
- Works just like arch_prctl, except that the arguments
- are reversed. */
- case PTRACE_ARCH_PRCTL:
- return do_arch_prctl(child, data, addr);
-
default:
return compat_ptrace_request(child, request, addr, data);
}