diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-07 10:46:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-07 10:46:06 -0700 |
commit | ab29b33a84f6910ebf01a32f69a370886a4283dd (patch) | |
tree | 13456cc951d245346c8339264bf81c289c2121e9 /arch/x86/um | |
parent | 08411a7554248009f26e85635f445a209604bfb5 (diff) | |
parent | 4fadd04d504a82f7f1fdeaddc144a9c396d1285e (diff) | |
download | linux-ab29b33a84f6910ebf01a32f69a370886a4283dd.tar.bz2 |
Merge tag 'seccomp-v4.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull seccomp fixes from Kees Cook:
"Fix UM seccomp vs ptrace, after reordering landed"
* tag 'seccomp-v4.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
seccomp: Remove 2-phase API documentation
um/ptrace: Fix the syscall number update after a ptrace
um/ptrace: Fix the syscall_trace_leave call
Diffstat (limited to 'arch/x86/um')
-rw-r--r-- | arch/x86/um/ptrace_32.c | 3 | ||||
-rw-r--r-- | arch/x86/um/ptrace_64.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/um/ptrace_32.c b/arch/x86/um/ptrace_32.c index ebd4dd6ef73b..a7ef7b131e25 100644 --- a/arch/x86/um/ptrace_32.c +++ b/arch/x86/um/ptrace_32.c @@ -84,7 +84,10 @@ int putreg(struct task_struct *child, int regno, unsigned long value) case EAX: case EIP: case UESP: + break; case ORIG_EAX: + /* Update the syscall number. */ + UPT_SYSCALL_NR(&child->thread.regs.regs) = value; break; case FS: if (value && (value & 3) != 3) diff --git a/arch/x86/um/ptrace_64.c b/arch/x86/um/ptrace_64.c index faab418876ce..0b5c184dd5b3 100644 --- a/arch/x86/um/ptrace_64.c +++ b/arch/x86/um/ptrace_64.c @@ -78,7 +78,11 @@ int putreg(struct task_struct *child, int regno, unsigned long value) case RSI: case RDI: case RBP: + break; + case ORIG_RAX: + /* Update the syscall number. */ + UPT_SYSCALL_NR(&child->thread.regs.regs) = value; break; case FS: |