The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/2] Add support to dump the kernel page tables
@ 2026-07-07  6:45 haoran.jiang
  2026-07-07  6:45 ` [PATCH 1/2] LoongArch: Enforce W^X for page-mapped virtual memory region haoran.jiang
  2026-07-07  6:45 ` [PATCH 2/2] LoongArch: Add support to dump the kernel page tables haoran.jiang
  0 siblings, 2 replies; 3+ messages in thread
From: haoran.jiang @ 2026-07-07  6:45 UTC (permalink / raw)
  To: loongarch; +Cc: linux-kernel, chenhuacai, kernel, yangtiezhu, Haoran Jiang

From: Haoran Jiang <jianghaoran@kylinos.cn>

Enforce the W^X principle on page tables, 
and also support the kernel page dump feature.

The following tests were performed:

kdb:
echo kgdbts=V1 > /sys/module/kgdbts/parameters/kgdbts

ebpf:
./test_progs -t struct_ops -d struct_ops_multi_pages
./test_progs -t fexit_stress
./test_progs -t module_fentry_shadow
./test_progs -t fentry_test/fentry
./test_progs -t fexit_test/fexit
./test_progs -t modify_return
./test_progs -t fexit_sleep
./test_progs -t test_overhead
./test_progs -t trampoline_count
./test_progs -t kprobe
./test_progs -t uprobe

livepatch:
insmod samples/livepatch/livepatch_sample.ko

kprobe:
insmod samples/kprobes/kprobe_example.ko
insmod samples/kprobes/kretprobe_example.ko

unxibench:
before this patch:
running 1 parallel copy of tests: 1492
running 128 parallel copies of tests:  8765

after this patch:
running 1 parallel copy of tests:  1440
running 128 parallel copies of tests:  8749


Haoran Jiang (2):
  LoongArch: Enforce W^X for page-mapped virtual memory region
  LoongArch: Add support to dump the kernel page tables

 arch/loongarch/Kconfig                    |   2 +
 arch/loongarch/include/asm/pgtable-bits.h |  12 +-
 arch/loongarch/kernel/ftrace_dyn.c        |  16 +
 arch/loongarch/kernel/inst.c              |  25 +-
 arch/loongarch/kernel/jump_label.c        |   3 +
 arch/loongarch/kernel/kgdb.c              |  50 +++
 arch/loongarch/kernel/kprobes.c           |   4 +-
 arch/loongarch/mm/Makefile                |   1 +
 arch/loongarch/mm/ptdump.c                | 474 ++++++++++++++++++++++
 9 files changed, 575 insertions(+), 12 deletions(-)
 create mode 100644 arch/loongarch/mm/ptdump.c

-- 
2.43.0


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

end of thread, other threads:[~2026-07-07  6:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07  6:45 [PATCH 0/2] Add support to dump the kernel page tables haoran.jiang
2026-07-07  6:45 ` [PATCH 1/2] LoongArch: Enforce W^X for page-mapped virtual memory region haoran.jiang
2026-07-07  6:45 ` [PATCH 2/2] LoongArch: Add support to dump the kernel page tables haoran.jiang

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