mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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> |
||
|---|---|---|
| .. | ||
| cache-ops.c | ||
| cacheflush.c | ||
| context.c | ||
| dma-noncoherent.c | ||
| extable.c | ||
| fault.c | ||
| hugetlbpage.c | ||
| init.c | ||
| kasan_init.c | ||
| Makefile | ||
| pageattr.c | ||
| pgtable.c | ||
| physaddr.c | ||
| pmem.c | ||
| ptdump.c | ||
| tlbflush.c | ||