diff options
| author | Xiaofeng Yuan <xiaofengmian@163.com> | 2026-08-20 17:56:57 -0600 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2026-08-20 17:56:57 -0600 |
| commit | bacc5c979bb6db4b94238ffe59eb9f23930b61f1 (patch) | |
| tree | 9a889dfde3adc9954e90d9408c3263f99c195ade /scripts/objdiff | |
| parent | 77ae27fd98f3b548797c9f22c10ab5cf1c4ada53 (diff) | |
| download | linux-next-bacc5c979bb6db4b94238ffe59eb9f23930b61f1.tar.gz linux-next-bacc5c979bb6db4b94238ffe59eb9f23930b61f1.zip | |
riscv: mm: make EXECMEM_KPROBES writable without CONFIG_STRICT_MODULE_RWX
When CONFIG_STRICT_MODULE_RWX is not set, execmem cannot create
temporary writable mappings for read-only executable pages. In this
case, the execmem ranges must already have writable permissions.
Currently EXECMEM_KPROBES unconditionally uses PAGE_KERNEL_READ_EXEC,
which causes kprobe instruction slot writes to trigger page faults
on systems where CONFIG_STRICT_MODULE_RWX is not enabled.
Fix this by using PAGE_KERNEL_EXEC when CONFIG_STRICT_MODULE_RWX
is not available.
Signed-off-by: Xiaofeng Yuan <xiaofengmian@163.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Nam Cao <namcao@linutronix.de>
Link: https://patch.msgid.link/20260814082742.148403-2-xiaofengmian@163.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
