linux-stable/arch/x86/entry
Linus Torvalds 5147da902e Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull exit cleanups from Eric Biederman:
 "While looking at some issues related to the exit path in the kernel I
  found several instances where the code is not using the existing
  abstractions properly.

  This set of changes introduces force_fatal_sig a way of sending a
  signal and not allowing it to be caught, and corrects the misuse of
  the existing abstractions that I found.

  A lot of the misuse of the existing abstractions are silly things such
  as doing something after calling a no return function, rolling BUG by
  hand, doing more work than necessary to terminate a kernel thread, or
  calling do_exit(SIGKILL) instead of calling force_sig(SIGKILL).

  In the review a deficiency in force_fatal_sig and force_sig_seccomp
  where ptrace or sigaction could prevent the delivery of the signal was
  found. I have added a change that adds SA_IMMUTABLE to change that
  makes it impossible to interrupt the delivery of those signals, and
  allows backporting to fix force_sig_seccomp

  And Arnd found an issue where a function passed to kthread_run had the
  wrong prototype, and after my cleanup was failing to build."

* 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (23 commits)
  soc: ti: fix wkup_m3_rproc_boot_thread return type
  signal: Add SA_IMMUTABLE to ensure forced siganls do not get changed
  signal: Replace force_sigsegv(SIGSEGV) with force_fatal_sig(SIGSEGV)
  exit/r8188eu: Replace the macro thread_exit with a simple return 0
  exit/rtl8712: Replace the macro thread_exit with a simple return 0
  exit/rtl8723bs: Replace the macro thread_exit with a simple return 0
  signal/x86: In emulate_vsyscall force a signal instead of calling do_exit
  signal/sparc32: In setup_rt_frame and setup_fram use force_fatal_sig
  signal/sparc32: Exit with a fatal signal when try_to_clear_window_buffer fails
  exit/syscall_user_dispatch: Send ordinary signals on failure
  signal: Implement force_fatal_sig
  exit/kthread: Have kernel threads return instead of calling do_exit
  signal/s390: Use force_sigsegv in default_trap_handler
  signal/vm86_32: Properly send SIGSEGV when the vm86 state cannot be saved.
  signal/vm86_32: Replace open coded BUG_ON with an actual BUG_ON
  signal/sparc: In setup_tsb_params convert open coded BUG into BUG
  signal/powerpc: On swapcontext failure force SIGSEGV
  signal/sh: Use force_sig(SIGKILL) instead of do_group_exit(SIGKILL)
  signal/mips: Update (_save|_restore)_fp_context to fail with -EFAULT
  signal/sparc32: Remove unreachable do_exit in do_sparc_fault
  ...
2021-11-10 16:15:54 -08:00
..
syscalls futex,x86: Wire up sys_futex_waitv() 2021-10-07 13:51:11 +02:00
vdso x86/build/vdso: fix missing FORCE for *.so build rule 2021-09-03 08:17:19 +09:00
vsyscall signal/x86: In emulate_vsyscall force a signal instead of calling do_exit 2021-10-29 14:31:34 -05:00
calling.h x86/entry: Split PUSH_AND_CLEAR_REGS into two submacros 2021-05-12 10:49:15 +02:00
common.c X86 entry code related updates: 2021-06-29 12:44:51 -07:00
entry_32.S - turn the stack canary into a normal __percpu variable on 32-bit which 2021-04-27 17:45:09 -07:00
entry_64.S X86 entry code related updates: 2021-06-29 12:44:51 -07:00
entry_64_compat.S x86/sev-es: Introduce ip_within_syscall_gap() helper 2021-03-08 14:22:17 +01:00
Makefile x86/syscalls: Don't adjust CFLAGS for syscall tables 2021-05-25 16:59:23 +02:00
syscall_32.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
syscall_64.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
syscall_x32.c x86/syscalls: Stop filling syscall arrays with *_sys_ni_syscall 2021-05-20 15:03:59 +02:00
thunk_32.S x86/entry: Remove unused THUNKs 2020-08-26 12:41:54 +02:00
thunk_64.S x86/entry: Remove put_ret_addr_in_rdi THUNK macro argument 2021-01-19 11:06:14 +01:00