summaryrefslogtreecommitdiff
path: root/arch/ia64/include
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-03-13 08:08:23 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-03-13 22:27:31 +0300
commit0ceb1ace4a2778e34a5414e5349712ae4dc41d85 (patch)
tree67bc0a86e5d33a62555f416e31e0f322182f7952 /arch/ia64/include
parent6ce64428d62026a10cb5d80138ff2f90cc21d367 (diff)
downloadlinux-0ceb1ace4a2778e34a5414e5349712ae4dc41d85.tar.xz
ia64: fix ia64_syscall_get_set_arguments() for break-based syscalls
In https://bugs.gentoo.org/769614 Dmitry noticed that `ptrace(PTRACE_GET_SYSCALL_INFO)` does not work for syscalls called via glibc's syscall() wrapper. ia64 has two ways to call syscalls from userspace: via `break` and via `eps` instructions. The difference is in stack layout: 1. `eps` creates simple stack frame: no locals, in{0..7} == out{0..8} 2. `break` uses userspace stack frame: may be locals (glibc provides one), in{0..7} == out{0..8}. Both work fine in syscall handling cde itself. But `ptrace(PTRACE_GET_SYSCALL_INFO)` uses unwind mechanism to re-extract syscall arguments but it does not account for locals. The change always skips locals registers. It should not change `eps` path as kernel's handler already enforces locals=0 and fixes `break`. Tested on v5.10 on rx3600 machine (ia64 9040 CPU). Link: https://lkml.kernel.org/r/20210221002554.333076-1-slyfox@gentoo.org Link: https://bugs.gentoo.org/769614 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Reported-by: Dmitry V. Levin <ldv@altlinux.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64/include')
0 files changed, 0 insertions, 0 deletions