riscv: fix KFENCE pool initialization
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | riscv: Recognize P4D leaves when splitting the linear mappingarch/ | +2 | 0 replies | |
| 2/2 | riscv: Prepare late KFENCE pools with PTE mappingsarch/ arch/ arch/ +1 more | +65 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] riscv: fix KFENCE pool initialization
From: Jackie Liu <[email protected]>
RISC-V KFENCE pool reservation failures can prevent the system from booting. These fixes allow boot to continue with KFENCE disabled and prepare late pools with the page mappings KFENCE requires.
The first patch fixes P4D leaf detection in the linear-map splitter. The second uses that splitter to prepare late KFENCE pools, while retaining the early PTE mapping.
Built RV64 kernels and RV32 pageattr.o. QEMU KFENCE KUnit covered boot and runtime enabling, pool reservation failure, and page-table allocation failures.
Thanks,
Jackie
Jackie Liu (2):
riscv: Recognize P4D leaves when splitting the linear mapping
riscv: Prepare late KFENCE pools with PTE mappings
arch/riscv/include/asm/kfence.h | 4 +- arch/riscv/include/asm/set_memory.h | 3 ++ arch/riscv/mm/init.c | 23 +++++++++-- arch/riscv/mm/pageattr.c | 59 ++++++++++++++++++++--------- 4 files changed, 67 insertions(+), 22 deletions(-)
base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8