Commit 5c465217 authored by Andy Lutomirski's avatar Andy Lutomirski Committed by Linus Torvalds

ptrace: in PEEK_SIGINFO, check syscall bitness, not task bitness

Users of the 32-bit ptrace() ABI expect the full 32-bit ABI.  siginfo
translation should check ptrace() ABI, not caller task ABI.

This is an ABI change on SPARC.  Let's hope that no one relied on the
old buggy ABI.
Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5c38065e
...@@ -681,7 +681,7 @@ static int ptrace_peek_siginfo(struct task_struct *child, ...@@ -681,7 +681,7 @@ static int ptrace_peek_siginfo(struct task_struct *child,
break; break;
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
if (unlikely(is_compat_task())) { if (unlikely(in_compat_syscall())) {
compat_siginfo_t __user *uinfo = compat_ptr(data); compat_siginfo_t __user *uinfo = compat_ptr(data);
if (copy_siginfo_to_user32(uinfo, &info) || if (copy_siginfo_to_user32(uinfo, &info) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment