The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] riscv: fix kprobes on minimal kernel configs
@ 2026-07-01 10:28 Xiaofeng Yuan
  2026-07-01 10:28 ` [PATCH 1/2] riscv: mm: make EXECMEM_KPROBES writable without ARCH_HAS_EXECMEM_ROX Xiaofeng Yuan
  2026-07-01 10:28 ` [PATCH 2/2] riscv: patch: skip fixmap mapping when kernel text is already writable Xiaofeng Yuan
  0 siblings, 2 replies; 4+ messages in thread
From: Xiaofeng Yuan @ 2026-07-01 10:28 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Alexandre Ghiti, Mark Brown, linux-riscv, linux-kernel,
	xiaofengmian

When building with an allnoconfig-derived minimal configuration
(without CONFIG_STRICT_MODULE_RWX), kprobes fails because
instruction slot pages from EXECMEM_KPROBES are read-only and
patch_map() bypasses the fixmap writable alias.

These two patches fix the infrastructure.

Xiaofeng Yuan (2):
  riscv: mm: make EXECMEM_KPROBES writable without ARCH_HAS_EXECMEM_ROX
  riscv: patch: skip fixmap mapping when kernel text is already writable

Xiaofeng Yuan (2):
  riscv: mm: make EXECMEM_KPROBES writable without ARCH_HAS_EXECMEM_ROX
  riscv: patch: skip fixmap mapping when kernel text is already writable

 arch/riscv/kernel/patch.c | 3 ++-
 arch/riscv/mm/init.c      | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-17 10:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 10:28 [PATCH 0/2] riscv: fix kprobes on minimal kernel configs Xiaofeng Yuan
2026-07-01 10:28 ` [PATCH 1/2] riscv: mm: make EXECMEM_KPROBES writable without ARCH_HAS_EXECMEM_ROX Xiaofeng Yuan
2026-07-17 10:46   ` Nam Cao
2026-07-01 10:28 ` [PATCH 2/2] riscv: patch: skip fixmap mapping when kernel text is already writable Xiaofeng Yuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox