On 7/8/2026 3:05 AM, Thomas Gleixner wrote: > add_random_kstack_offset() is invoked before syscall_enter_from_user_mode() > establishes state. That's wrong because add_random_kstack_offset() calls > into instrumentable code. > > Move it after syscall_enter_from_user_mode() to ensure that state is > correctly established. > > Signed-off-by: Thomas Gleixner <[email protected]> > Cc: Michael Ellerman <[email protected]> > Cc: Shrikanth Hegde <[email protected]> > Cc: [email protected] > --- > arch/powerpc/kernel/syscall.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/arch/powerpc/kernel/syscall.c > +++ b/arch/powerpc/kernel/syscall.c > @@ -19,8 +19,8 @@ notrace long system_call_exception(struc > long ret; > syscall_fn f; > > - add_random_kstack_offset(); > r0 = syscall_enter_from_user_mode(regs, r0); > + add_random_kstack_offset(); Reviewed-by: Jinjie Ruan <[email protected]> > > if (unlikely(r0 >= NR_syscalls)) { > if (unlikely(trap_is_unsupported_scv(regs))) { > _______________________________________________ linux-snps-arc mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-snps-arc
- Re: [patch 03/18] entry: Provide [syscall_]en... Jinjie Ruan
- Re: [patch 03/18] entry: Provide [syscall_]en... Philippe Mathieu-Daudé
- [patch 05/18] powerpc/syscall: Use syscall_enter_f... Thomas Gleixner
- Re: [patch 05/18] powerpc/syscall: Use syscal... Radu Rendec
- Re: [patch 05/18] powerpc/syscall: Use syscal... Jinjie Ruan
- Re: [patch 05/18] powerpc/syscall: Use syscal... Philippe Mathieu-Daudé
- Re: [patch 05/18] powerpc/syscall: Use syscal... Mukesh Kumar Chaurasiya
- [patch 01/18] powerpc: Move stack randomization af... Thomas Gleixner
- Re: [patch 01/18] powerpc: Move stack randomi... Shrikanth Hegde
- Re: [patch 01/18] powerpc: Move stack randomi... Radu Rendec
- Re: [patch 01/18] powerpc: Move stack randomi... Jinjie Ruan
- Re: [patch 01/18] powerpc: Move stack randomi... Philippe Mathieu-Daudé
- Re: [patch 01/18] powerpc: Move stack randomi... Mukesh Kumar Chaurasiya
- [patch 07/18] s390/syscall: Use enter_from_user_mo... Thomas Gleixner
- Re: [patch 07/18] s390/syscall: Use enter_fro... Sven Schnelle
- Re: [patch 07/18] s390/syscall: Use enter_fro... Radu Rendec
- Re: [patch 07/18] s390/syscall: Use enter_fro... Jinjie Ruan
- Re: [patch 07/18] s390/syscall: Use enter_fro... Jinjie Ruan
- Re: [patch 07/18] s390/syscall: Use enter... Philippe Mathieu-Daudé
- Re: [patch 07/18] s390/syscall: Use enter_fro... Mukesh Kumar Chaurasiya
- [patch 08/18] x86/syscall: Use [syscall_]enter_fro... Thomas Gleixner
