summaryrefslogtreecommitdiffstats
path: root/lib/dump_stack.c
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2016-02-10 23:15:27 +0100
committerIngo Molnar <mingo@kernel.org>2016-02-17 09:51:06 +0100
commit4e79e182b419172e35936a47f098509092d69817 (patch)
tree92a43a6a378aa593e754169b520c91a91c5194e4 /lib/dump_stack.c
parentselftests/x86: Add a test for syscall restart under ptrace (diff)
downloadlinux-4e79e182b419172e35936a47f098509092d69817.tar.xz
linux-4e79e182b419172e35936a47f098509092d69817.zip
x86/entry/compat: Keep TS_COMPAT set during signal delivery
Signal delivery needs to know the sign of an interrupted syscall's return value in order to detect -ERESTART variants. Normally this works independently of bitness because syscalls internally return long. Under ptrace, however, this can break, and syscall_get_error is supposed to sign-extend regs->ax if needed. We were clearing TS_COMPAT too early, though, and this prevented sign extension, which subtly broke syscall restart under ptrace. Reported-by: Robert O'Callahan <robert@ocallahan.org> Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org # 4.3.x- Fixes: c5c46f59e4e7 ("x86/entry: Add new, comprehensible entry and exit handlers written in C") Link: http://lkml.kernel.org/r/cbce3cf545522f64eb37f5478cb59746230db3b5.1455142412.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/dump_stack.c')
0 files changed, 0 insertions, 0 deletions