mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] riscv: mm: fix set_memory_x() and kernel_page_present()
@ 2026-11-17 14:00 Mike Rapoport (Microsoft)
  2026-11-17 14:00 ` [PATCH v2 1/2] riscv: mm: do not make the linear map alias executable in set_memory_*() Mike Rapoport (Microsoft)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mike Rapoport (Microsoft) @ 2026-11-17 14:00 UTC (permalink / raw)
  To: Albert Ou, Palmer Dabbelt, Paul Walmsley
  Cc: Alexandre Ghiti, Jisheng Zhang, Mike Rapoport, linux-kernel, linux-riscv

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 linear map as not present. Today it says they are mapped, and
hibernation could copy them without mapping them first.

---
Changes in v2:
- read the PMD entry once in kernel_page_present() (Jisheng)
- Link to v1: https://patch.msgid.link/20261112-fixes-riscv-v1-0-1caac19897b5@kernel.org

---
Mike Rapoport (Microsoft) (2):
      riscv: mm: 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 | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261112-fixes-riscv-3e48788f58fe

--
Sincerely yours,
Mike.


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

end of thread, other threads:[~2026-11-17 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17 14:00 [PATCH v2 0/2] riscv: mm: fix set_memory_x() and kernel_page_present() Mike Rapoport (Microsoft)
2026-11-17 14:00 ` [PATCH v2 1/2] riscv: mm: do not make the linear map alias executable in set_memory_*() Mike Rapoport (Microsoft)
2026-11-17 14:00 ` [PATCH v2 2/2] riscv: mm: check the valid bit in kernel_page_present() Mike Rapoport (Microsoft)
2026-11-17 14:00 ` [PATCH v2 0/2] riscv: mm: fix set_memory_x() and kernel_page_present() Jisheng Zhang

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

all inboxes | Powered by JetHome®