Re: [patch 09/18] entry: Remove syscall_enter_from_user_mode()

Thomas Gleixner <[email protected]> Thu, 09 Jul 2026 00:08:11 +0200
Newsgroups gmane.linux.ports.hexagon,gmane.linux.kernel,gmane.linux.ports.ppc64.devel,gmane.linux.ports.riscv,gmane.linux.ports.arm.kernel,gmane.linux.ports.alpha,gmane.linux.ports.mips,gmane.linux.ports.parisc,gmane.linux.ports.sh.devel,gmane.linux.uml.devel,gmane.linux.kernel.arc,gmane.linux.ports.sparc,gmane.linux.kernel.cross-arch,gmane.linux.documentation
Message-ID <87mrw1qgms.ffs@fw13>
On Wed, Jul 08 2026 at 17:21, Radu Rendec wrote:

> On Tue, 2026-07-07 at 21:06 +0200, Thomas Gleixner wrote:
>> All architecture use either:
>>=20
>> =C2=A0=C2=A0=C2=A0 nr =3D enter_from_user_mode_randomize_stack(regs, nr);
>
> You probably mean syscall_enter_from_user_mode_randomize_stack.

Duh. I obviously got that wrong in a hurry. Thanks for pointing it out!
>> =C2=A0static __always_inline bool report_single_step(unsigned long work)
>> =C2=A0{
>> --- a/include/linux/irq-entry-common.h
>> +++ b/include/linux/irq-entry-common.h
>> @@ -49,9 +49,9 @@
>> =C2=A0 * Defaults to an empty implementation. Can be replaced by archite=
cture
>> =C2=A0 * specific code.
>> =C2=A0 *
>> - * Invoked from syscall_enter_from_user_mode() in the non-instrumentable
>> - * section. Use __always_inline so the compiler cannot push it out of l=
ine
>> - * and make it instrumentable.
>> + * Invoked from enter_from_user_mode_syscall_and_randomize_stack() in t=
he
>                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Probably syscall_enter_from_user_mode_randomize_stack()? But the
> reality is it's only ever invoked from enter_from_user_mode(), which is
> below in the same file (include/linux/irq-entry-common.h).

Yes. Indeed.