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

Mukesh Kumar Chaurasiya mkchauras at gmail.com
Thu Jul 9 11:32:27 PDT 2026


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 <tglx at kernel.org>
> Cc: Michael Ellerman <mpe at ellerman.id.au>
> Cc: Shrikanth Hegde <sshegde at linux.ibm.com>
> Cc: linuxppc-dev at lists.ozlabs.org

Thanks for fixing this.

Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras at gmail.com>

[...]



More information about the linux-riscv mailing list