linux/arch/x86/um
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
..
asm um: Move declarations to proper headers 2024-04-22 21:58:48 +02:00
os-Linux um: Add missing headers 2024-04-22 21:46:20 +02:00
shared/sysdep um: Fix the -Wmissing-prototypes warning for get_thread_reg 2024-04-30 14:15:17 +02:00
vdso This pull request contains the following changes for UML: 2024-05-25 13:17:48 -07:00
bugs_32.c um: Add missing headers 2024-04-22 21:46:20 +02:00
bugs_64.c um: Add missing headers 2024-04-22 21:46:20 +02:00
delay.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
elfcore.c um: Add missing headers 2024-04-22 21:46:20 +02:00
fault.c um: Add missing headers 2024-04-22 21:46:20 +02:00
Kconfig x86/um: Kconfig: Fix indentation 2022-07-17 23:13:24 +02:00
ldt.c um: Fix out-of-bounds read in LDT setup 2022-05-27 09:03:41 +02:00
Makefile um: Hard-code the result of 'uname -s' 2023-08-26 22:40:37 +02:00
mem_32.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
mem_64.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ptrace_32.c um: Move declarations to proper headers 2024-04-22 21:58:48 +02:00
ptrace_64.c um: Drop support for hosts without SYSEMU_SINGLESTEP support 2024-01-04 23:29:11 +01:00
ptrace_user.c um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
setjmp_32.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
setjmp_64.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
signal.c um: Fix -Wmissing-prototypes warnings for (rt_)sigreturn 2024-04-30 14:13:38 +02:00
stub_32.S um: rework userspace stubs to not hard-code stub location 2021-02-12 21:35:02 +01:00
stub_64.S um: rework userspace stubs to not hard-code stub location 2021-02-12 21:35:02 +01:00
stub_segv.c um: make stub data pages size tweakable 2023-04-20 23:08:43 +02:00
sys_call_table_32.c x86/syscall: Mark exit[_group] syscall handlers __noreturn 2024-06-28 15:23:38 +02:00
sys_call_table_64.c x86/syscall: Mark exit[_group] syscall handlers __noreturn 2024-06-28 15:23:38 +02:00
syscalls_32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscalls_64.c um: Rely on PTRACE_SETREGSET to set FS/GS base registers 2024-01-05 16:28:56 +01:00
sysrq_32.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/debug.h> 2017-03-02 08:42:34 +01:00
sysrq_64.c sched.h: move pid helpers to pid.h 2023-12-20 19:26:31 -05:00
tls_32.c um: Remove unused do_get_thread_area function 2024-04-30 14:18:00 +02:00
tls_64.c um: Rely on PTRACE_SETREGSET to set FS/GS base registers 2024-01-05 16:28:56 +01:00
user-offsets.c um: Fix -Wmissing-prototypes warnings for __warp_* and foo 2024-04-22 21:58:48 +02:00