Re: [PATCH v6 1/3] x86/syscall: Mark exit[_group] syscall handlers __noreturn

From: Borislav Petkov
Date: Thu Jun 27 2024 - 03:27:17 EST


On Tue, Jun 25, 2024 at 11:02:00PM -0700, Josh Poimboeuf wrote:
> 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: 7390db8aea0d ("x86/bhi: Add support for clearing branch history at syscall entry")
> Reported-by: "Paul E. McKenney" <paulmck@xxxxxxxxxx>
> Closes: https://lkml.kernel.org/lkml/6dba9b32-db2c-4e6d-9500-7a08852f17a3@paulmck-laptop

This here talks about

1e3ad78334a6 ("x86/syscall: Don't force use of indirect calls for system calls")

being the culprit.

But Fixes points to something unrelated...?

In any case, I won't send this to Linus now as urgent material unless someone
presents a reasonable argument for it...

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette