summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-08-23 20:05:47 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-23 20:05:47 +0200
commite99b2507baccca79394ec646e3d1a0884667ea98 (patch)
tree86b13e24fe2c51b6fb66170e6b2c2ca99f8c5e2a /kernel
parentMerge tag 'edac_urgent_for_v5.9_rc2' of git://git.kernel.org/pub/scm/linux/ke... (diff)
parentcore/entry: Respect syscall number rewrites (diff)
downloadlinux-e99b2507baccca79394ec646e3d1a0884667ea98.tar.xz
linux-e99b2507baccca79394ec646e3d1a0884667ea98.zip
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.c3
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)