diff options
author | Andy Lutomirski <luto@amacapital.net> | 2014-11-04 18:36:50 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-11-10 04:46:35 -0500 |
commit | 26893107aa717cd11010f0c278d02535defa1ac9 (patch) | |
tree | 1acd1b0f36e54540999c69b1ec8404e3f2fbdb5c | |
parent | 07114f0f1cda8b2ef6e884d0c7b268a32cce7903 (diff) |
x86_64/vsyscall: Restore orig_ax after vsyscall seccomp
The vsyscall emulation code sets orig_ax for seccomp's benefit,
but it forgot to set it back.
I'm not sure that this is observable at all, but it could cause
confusion to various /proc or ptrace users, and it's possible
that it could cause minor artifacts if a signal were to be
delivered on return from vsyscall emulation.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/cdc6a564517a4df09235572ee5f530ccdcf933f7.1415144089.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/kernel/vsyscall_64.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index 7d9eb4bc10ac..2dcc6ff6fdcc 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -206,6 +206,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) | |||
206 | "seccomp tried to change syscall nr or ip"); | 206 | "seccomp tried to change syscall nr or ip"); |
207 | do_exit(SIGSYS); | 207 | do_exit(SIGSYS); |
208 | } | 208 | } |
209 | regs->orig_ax = -1; | ||
209 | if (tmp) | 210 | if (tmp) |
210 | goto do_ret; /* skip requested */ | 211 | goto do_ret; /* skip requested */ |
211 | 212 | ||