diff options
author | Andy Lutomirski <luto@kernel.org> | 2016-02-10 22:15:27 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-02-17 08:51:06 (GMT) |
commit | 4e79e182b419172e35936a47f098509092d69817 (patch) | |
tree | 92a43a6a378aa593e754169b520c91a91c5194e4 /block/blk-timeout.c | |
parent | 403613432222549727e5d70cf44da8987653202a (diff) | |
download | linux-4e79e182b419172e35936a47f098509092d69817.tar.xz |
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 'block/blk-timeout.c')
0 files changed, 0 insertions, 0 deletions