]> git.baikalelectronics.ru Git - kernel.git/commit
core/entry: Respect syscall number rewrites
authorThomas Gleixner <tglx@linutronix.de>
Wed, 19 Aug 2020 19:44:39 +0000 (21:44 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 21 Aug 2020 14:17:29 +0000 (16:17 +0200)
commit3d67ecb7c0b4618494585928fe53a44df3e1a51d
tree6e9aeebff846d2ab1821b22fec31b69b7861bf1e
parente5f0bf958198ed018c9fdf06e8d307ced9af9c95
core/entry: Respect syscall number rewrites

The transcript of the x86 entry code to the generic version failed to
reload the syscall number from ptregs after ptrace and seccomp have run,
which both can modify the syscall number in ptregs. It returns the original
syscall number instead which is obviously not the right thing to do.

Reload the syscall number to fix that.

Fixes: a2709f569f40 ("entry: Provide generic syscall entry functionality")
Reported-by: Kyle Huey <me@kylehuey.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Kyle Huey <me@kylehuey.com>
Tested-by: Kees Cook <keescook@chromium.org>
Acked-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/87blj6ifo8.fsf@nanos.tec.linutronix.de
kernel/entry/common.c