diff options
author | Andy Lutomirski <[email protected]> | 2016-02-10 14:15:27 -0800 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2016-02-17 09:51:06 +0100 |
commit | 4e79e182b419172e35936a47f098509092d69817 (patch) | |
tree | 92a43a6a378aa593e754169b520c91a91c5194e4 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | 403613432222549727e5d70cf44da8987653202a (diff) |
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 <[email protected]>
Signed-off-by: Andy Lutomirski <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected] # 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 <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
0 files changed, 0 insertions, 0 deletions