[GIT pull] core/urgent for v5.9-rc2

From: Thomas Gleixner
Date: Sun Aug 23 2020 - 04:27:13 EST


Linus,

please pull the latest core/urgent branch from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-urgent-2020-08-23

up to: d88d59b64ca3: core/entry: Respect syscall number rewrites


A single bug fix for the common entry code. The transcript of the x86
version messed up the reload of the syscall number from pt_regs after
ptrace and seccomp which breaks syscall number rewriting.

Thanks,

tglx

------------------>
Thomas Gleixner (1):
core/entry: Respect syscall number rewrites


kernel/entry/common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

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)