linux-stable/arch/x86/entry
Josh Poimboeuf 9142be9e64 x86/syscall: Mark exit[_group] syscall handlers __noreturn
The direct-call syscall dispatch function doesn't know that the exit()
and exit_group() syscall handlers don't return, so the call sites aren't
optimized accordingly.

Fix that by marking the exit syscall declarations __noreturn.

Fixes the following warnings:

  vmlinux.o: warning: objtool: x64_sys_call+0x2804: __x64_sys_exit() is missing a __noreturn annotation
  vmlinux.o: warning: objtool: ia32_sys_call+0x29b6: __ia32_sys_exit_group() is missing a __noreturn annotation

Fixes: 1e3ad78334 ("x86/syscall: Don't force use of indirect calls for system calls")
Closes: https://lkml.kernel.org/lkml/6dba9b32-db2c-4e6d-9500-7a08852f17a3@paulmck-laptop
Reported-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Link: https://lore.kernel.org/r/5d8882bc077d8eadcc7fd1740b56dfb781f12288.1719381528.git.jpoimboe@kernel.org
2024-06-28 15:23:38 +02:00
..
syscalls x86/syscall: Mark exit[_group] syscall handlers __noreturn 2024-06-28 15:23:38 +02:00
vdso Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
vsyscall x86/mm: Remove broken vsyscall emulation code from the page fault code 2024-05-01 09:41:43 +02:00
calling.h Core x86 changes for v6.9: 2024-03-11 19:53:15 -07:00
common.c x86/fred: Fix INT80 emulation for FRED 2024-04-18 10:37:11 +02:00
entry_32.S Core x86 changes for v6.9: 2024-03-11 19:53:15 -07:00
entry_64_compat.S x86/cleanups changes for v6.10: 2024-05-13 18:21:24 -07:00
entry_64_fred.S x86/entry: Add fred_entry_from_kvm() for VMX to handle IRQ/NMI 2024-01-31 22:03:16 +01:00
entry_64.S x86/bhi: Add support for clearing branch history at syscall entry 2024-04-08 19:27:05 +02:00
entry_fred.c x86/irq: Install posted MSI notification handler 2024-04-30 00:54:42 +02:00
entry.S Core x86 changes for v6.9: 2024-03-11 19:53:15 -07:00
Makefile x86/entry: Merge thunk_64.S and thunk_32.S into thunk.S 2024-04-09 09:57:56 +02:00
syscall_32.c x86/syscall: Mark exit[_group] syscall handlers __noreturn 2024-06-28 15:23:38 +02:00
syscall_64.c x86/syscall: Mark exit[_group] syscall handlers __noreturn 2024-06-28 15:23:38 +02:00
syscall_x32.c x86/syscall: Mark exit[_group] syscall handlers __noreturn 2024-06-28 15:23:38 +02:00
thunk.S x86/entry: Merge thunk_64.S and thunk_32.S into thunk.S 2024-04-09 09:57:56 +02:00