[PATCH v2 2/6] riscv: insn: Set sstatus.MXR when reading userspace instruction
Paul Walmsley
pjw at kernel.org
Mon Aug 24 17:06:53 PDT 2026
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
More information about the linux-riscv
mailing list