[PATCH v5 0/2] riscv: fix text patching on minimal kernel configs

Paul Walmsley pjw at kernel.org
Fri Aug 14 13:18:04 PDT 2026


On Fri, 14 Aug 2026, Xiaofeng Yuan wrote:

> This series fixes two related issues that break kprobes and kernel text
> patching on RISC-V configurations where CONFIG_STRICT_MODULE_RWX is not
> available (e.g. CONFIG_MODULES=n).
> 
> Patch 1 makes the EXECMEM_KPROBES range writable when
> CONFIG_STRICT_MODULE_RWX is disabled, so kprobe instruction slot writes
> do not fault on read-only executable pages.
> 
> Patch 2 makes patch_map() skip the temporary fixmap mapping when the
> kernel text is already writable, i.e. when CONFIG_STRICT_KERNEL_RWX is
> disabled. The module text path is still gated on CONFIG_STRICT_MODULE_RWX.

Thanks, queued for v7.3-rc.


- Paul



More information about the linux-riscv mailing list