Re: [PATCH v2 2/6] riscv: insn: Set sstatus.MXR when reading userspace instruction

Paul Walmsley <[email protected]>
Newsgroups org.infradead.lists.linux-riscv
Message-ID <[email protected]>
Hi,

On Tue, 28 Jul 2026, Yicong Yang wrote:

> The __read_insn() uses get_user() to read userspace instructions.
> Bo Gan noticed that get_user() is insufficient in this case since
> it's possible for the instruction segment mapped as execute-only
> and get_user() doesn't have permissions to load it. The architecture
> provides sstatus.MXR for handling this so set MXR when reading
> userspace instruction.

If this patch fixes a bug with the preceding patch, it would
better just to roll the fix into the original patch.


- Paul

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
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.