v1
2026-11-05
共享vmemmap尾页只读 · v1
将共享 vmemmap tail 页映射为只读,覆盖 sparse-vmemmap 与 powerpc radix,并移除 HugeTLB 专用写保护。
原始补丁链接
子 Patch(4)
1/4
mm/sparse-vmemmap: map shared vmemmap tail pages as read-only
Both early HugeTLB HVO and device DAX use the common vmemmap population path for shared tail mappings. Map these pages read-only so that illegal writes fault instead of corrupting metadata shared by m
2/4
powerpc/mm: map shared vmemmap tail pages as read-only
PowerPC radix uses an architecture-specific vmemmap population path for shared tail mappings, so it does not inherit the read-only protection added to the common path. Protect these mappings as well
3/4
mm/hugetlb_vmemmap: remove vmemmap_wrprotect_hvo()
Shared vmemmap tail pages are now mapped read-only during initial population, so already optimized HugeTLB bootmem folios no longer need a separate write-protection pass. Remove vmemmap_wrprotect_hvo
4/4
mm/hugetlb_vmemmap: remove hugetlb_vmemmap_optimize_bootmem_folios()
With vmemmap_wrprotect_hvo() removed, the bootmem wrapper no longer performs any bootmem-specific work. Call hugetlb_vmemmap_optimize_folios() directly for bootmem folios and remove the redundant wra