diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-23 11:05:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-08-23 11:05:47 -0700 |
commit | e99b2507baccca79394ec646e3d1a0884667ea98 (patch) | |
tree | 86b13e24fe2c51b6fb66170e6b2c2ca99f8c5e2a /kernel | |
parent | d9232cb79651c244f8679607b6e30c5230bcc967 (diff) | |
parent | d88d59b64ca35abae208e2781fdb45e69cbed56c (diff) |
Merge tag 'core-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull entry fix from Thomas Gleixner:
"A single bug fix for the common entry code.
The transcription of the x86 version messed up the reload of the
syscall number from pt_regs after ptrace and seccomp which breaks
syscall number rewriting"
* tag 'core-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
core/entry: Respect syscall number rewrites
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/entry/common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 9852e0d62d95..fcae019158ca 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -65,7 +65,8 @@ static long syscall_trace_enter(struct pt_regs *regs, long syscall, syscall_enter_audit(regs, syscall); - return ret ? : syscall; + /* The above might have changed the syscall number */ + return ret ? : syscall_get_nr(current, regs); } noinstr long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall) |