[PATCH 0/2] riscv: mm: fix set_memory_x() and kernel_page_present()

Mike Rapoport (Microsoft) rppt at kernel.org
Thu Nov 12 05:42:17 PST 2026


These are two riscv fixes I found while working on a generic
implementation of the set_memory APIs.

The first one stops set_memory_x() from making the linear map alias of
module and BPF text executable.

The second one makes kernel_page_present() report the pages removed from
the direct map as not present. Today it says they are mapped, and
hibernation could copy them without mapping them first.

---
Mike Rapoport (Microsoft) (2):
      riscv: do not make the linear map alias executable in set_memory_*()
      riscv: mm: check the valid bit in kernel_page_present()

 arch/riscv/mm/pageattr.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261112-fixes-riscv-3e48788f58fe

--
Sincerely yours,
Mike.




More information about the linux-riscv mailing list