Re: [PATCH v2 1/1] mm: disallow raw PFN mappings of huge/shared zeropage

From: David Hildenbrand (Arm)

Date: Mon Sep 21 2026 - 05:38:23 EST


On 9/21/26 07:42, Lance Yang wrote:
> From: Lance Yang <lance.yang@xxxxxxxxx>
>
> Handling the huge/shared zeropage correctly in vmf_insert_pfn_pmd() and
> vmf_insert_pfn_prot() is more involved. We would need to check whether the
> VMA allows it and keep the mapping read-only, similar to the checks in
> vm_mixed_ok().
>
> No in-tree user needs that support, so reject these mappings with
> VM_FAULT_SIGBUS rather than complicate the code for now.
>
> Link: https://lore.kernel.org/all/20260917121010.60966-1-lance.yang@xxxxxxxxx/
> Suggested-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
> Suggested-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
> Reviewed-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
> Signed-off-by: Lance Yang <lance.yang@xxxxxxxxx>
> ---
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David