1
0
Fork 0
freescale-linux-fslc/arch/x86/entry
Andy Lutomirski e40384fcd6 x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls
commit 5d5675df79 upstream.

On a 32-bit fast syscall that fails to read its arguments from user
memory, the kernel currently does syscall exit work but not
syscall entry work.  This confuses audit and ptrace.  For example:

    $ ./tools/testing/selftests/x86/syscall_arg_fault_32
    ...
    strace: pid 264258: entering, ptrace_syscall_info.op == 2
    ...

This is a minimal fix intended for ease of backporting.  A more
complete cleanup is coming.

Fixes: 0b085e68f4 ("x86/entry: Consolidate 32/64 bit syscall entry")
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/8c82296ddf803b91f8d1e5eac89e5803ba54ab0e.1614884673.git.luto@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-17 17:06:36 +01:00
..
syscalls A couple of x86 fixes which missed rc1 due to my stupidity: 2020-10-27 14:39:29 -07:00
vdso Kbuild updates for v5.10 2020-10-22 13:13:57 -07:00
vsyscall y2038: syscall implementation cleanups 2019-12-01 14:00:59 -08:00
Makefile x86/entry: Actually disable stack protector 2020-07-19 13:07:10 +02:00
calling.h x86/entry/64: Do not include inst.h in calling.h 2020-09-04 10:59:21 +02:00
common.c x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls 2021-03-17 17:06:36 +01:00
entry_32.S xen: branch for v5.9-rc1b 2020-08-14 13:34:37 -07:00
entry_64.S This feature enhances the current guest memory encryption support 2020-10-14 10:21:34 -07:00
entry_64_compat.S x86/sev-es: Introduce ip_within_syscall_gap() helper 2021-03-17 17:06:35 +01:00
syscall_32.c x86/entry: Drop asmlinkage from syscalls 2020-03-21 16:03:25 +01:00
syscall_64.c x86/entry: Drop asmlinkage from syscalls 2020-03-21 16:03:25 +01:00
syscall_x32.c mm: remove compat_process_vm_{readv,writev} 2020-10-03 00:02:15 -04:00
thunk_32.S x86/entry: Remove unused THUNKs 2020-08-26 12:41:54 +02:00
thunk_64.S x86/entry: Emit a symbol for register restoring thunk 2021-02-03 23:28:40 +01:00