[PATCH v1] riscv: mm: Define PAGE_KERNEL_RO
patchwork-bot+linux-riscv at kernel.org
patchwork-bot+linux-riscv at kernel.org
Sat Nov 7 05:31:25 PST 2026
Hello:
This patch was applied to riscv/linux.git (fixes)
by Paul Walmsley <pjw at kernel.org>:
On Sat, 17 Oct 2026 22:36:49 -0400 you wrote:
> Kernel mappings that generic code creates read-only are writable on
> riscv. With HugeTLB vmemmap optimization (selected by riscv and on by
> default with CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON), the tail
> vmemmap pages of every optimized huge page are remapped to one shared
> page with PAGE_KERNEL_RO so that a stray write to a tail struct page
> faults. On riscv that remap keeps _PAGE_WRITE, so such a write silently
> changes the struct pages of every optimized huge page instead.
> early_memremap_ro() (EFI system and configuration tables), the
> firmware loader's vmap() of the loaded image, and acpi_os_ioremap() for
> EFI runtime code and NOMAP regions, which asks for a read-only mapping
> precisely to avoid a writable mapping of executable code, are affected
> the same way.
>
> [...]
Here is the summary with links:
- [v1] riscv: mm: Define PAGE_KERNEL_RO
https://git.kernel.org/riscv/c/551bdd6fcaba
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
More information about the linux-riscv
mailing list