Re: [patch 01/18] powerpc: Move stack randomization after syscall_enter_from_user_mode()

Mukesh Kumar Chaurasiya <[email protected]> Fri, 10 Jul 2026 00:02:27 +0530
Newsgroups gmane.linux.ports.alpha,gmane.linux.kernel,gmane.linux.ports.ppc64.devel,gmane.linux.ports.riscv,gmane.linux.ports.arm.kernel,gmane.linux.ports.mips,gmane.linux.ports.parisc,gmane.linux.ports.sh.devel,gmane.linux.uml.devel,gmane.linux.kernel.arc,gmane.linux.ports.hexagon,gmane.linux.ports.sparc,gmane.linux.kernel.cross-arch,gmane.linux.documentation
Message-ID <[email protected]>
On Tue, Jul 07, 2026 at 09:05:58PM +0200, 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]

Thanks for fixing this.

Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <[email protected]>

[...]