From: Madhavan Srinivasan <maddy@linux.ibm.com>
To: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Venkat Rao Bagalkote <venkat88@linux.ibm.com>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Mukesh Kumar Chaurasiya <mkchauras@gmail.com>,
Christophe Leroy <chleroy@kernel.org>
Subject: Re: [PATCH] powerpc: Do not restore KUAP in arch_exit_to_user_mode_prepare()
Date: Wed, 9 Sep 2026 11:48:20 +0530 [thread overview]
Message-ID: <178893459266.174069.7557874308297448634.b4-ty@linux.ibm.com> (raw)
In-Reply-To: <52fee44fd23acf8e1c024ace668728e626a783a8.1788101609.git.ritesh.list@gmail.com>
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
prev parent reply other threads:[~2026-09-09 6:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 14:54 [PATCH] powerpc: Do not restore KUAP in arch_exit_to_user_mode_prepare() Ritesh Harjani (IBM)
2026-08-31 4:11 ` Mukesh Kumar Chaurasiya
2026-09-01 4:27 ` Venkat Rao Bagalkote
2026-09-09 6:18 ` Madhavan Srinivasan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178893459266.174069.7557874308297448634.b4-ty@linux.ibm.com \
--to=maddy@linux.ibm.com \
--cc=chleroy@kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mkchauras@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sshegde@linux.ibm.com \
--cc=venkat88@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox