On Sun, 30 Aug 2026 20:24:30 +0530, Ritesh Harjani (IBM) wrote:
> KUAP means kernel cannot touch user memory unless it explicitly is
> enabled. In the kernel it should stay AMR_KUAP_BLOCKED. While returning
> to userspace just before RFI, kernel should restore the user AMR value
> back.
> 
> Looks like GENERIC_ENTRY might be treating arch_exit_to_user_mode_prepare()
> as the last architecture step before returning to userspace.
> commit bee25f97ad24 ("powerpc: Enable GENERIC_ENTRY feature")
> therefore called kuap_user_restore() from that hook. But on PowerPC that
> is too early. After irqentry_exit() / syscall_exit_to_user_mode() we
> still run platform specific exit routines.
> 
> [...]

Applied to powerpc/fixes.

[1/1] powerpc: Do not restore KUAP in arch_exit_to_user_mode_prepare()
      https://git.kernel.org/powerpc/c/c2549d749539487239475fbc8c614a1f9244d655

cheers

Reply via email to