Re: [PATCH RFC] arm64: entry: PSTATE_I_SET is leaking on pseudo NMI mode

Breno Leitao <[email protected]>
Newsgroups org.kernel.vger.bpf,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Mon, Aug 10, 2026 at 12:43:11PM +0100, Will Deacon wrote:
> On Fri, Aug 07, 2026 at 09:29:12AM -0700, Breno Leitao wrote:
> > On Fri, Aug 07, 2026 at 07:58:21AM -0700, Breno Leitao wrote:
> > > Meanwhile, I will try to ftrace the writes to PMR and regs->pmr to get
> > > a better grasp of the states machine we are in (probably on Monday).
> > 
> > It seems LLM found a very easy to reproduce this:
> > 
> > 	bash-5.1# dmesg
> > 
> > 	bash-5.1#  cd /sys/kernel/tracing
> > 	echo 'r:pmr vfs_read bad=+0($retval):u64' >> kprobe_events
> > 	echo 1 > events/kprobes/pmr/enable
> 
> Nice, that triggers straightforwardly in QEMU for me. The diff below
> (which implements my suggestion from [1]) seems to fix the issue, but
> it would be good to hear feedback from one of the Arm folks.

I've tested the patch on my machines, and it fixes all the cases I've
got.

If it is useful:
  Tested-by: Breno Leitao <[email protected]>

Thanks for looking at it,
--breno
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.