[PATCH v2 5/6] mm/page_vma_mapped: use huge_ptep_get() for hugetlb

David Hildenbrand (Arm) david at kernel.org
Thu Jul 2 08:44:52 PDT 2026


On 7/2/26 07:13, Dev Jain wrote:
> check_pte() is the final validation step in page_vma_mapped_walk().
> It reads pvmw->pte with ptep_get() to decide whether the entry maps
> the PFN range being walked. For hugetlb VMAs, that pointer refers
> to a hugetlb entry.
> 
> On arches which provide their own huge_ptep_get() to dereference a huge
> pte pointer, accessing via ptep_get() would cause pte_pfn(),
> pte_present() etc to misbehave.
> 
> It is not clear whether this has a trivially visible effect to userspace.
> 
> Use huge_ptep_get() to dereference a huge pte pointer.
> 
> Fixes: ace71a19cec5 ("mm: introduce page_vma_mapped_walk()")
> Cc: stable at vger.kernel.org
> Signed-off-by: Dev Jain <dev.jain at arm.com>
> ---

Acked-by: David Hildenbrand (Arm) <david at kernel.org>

-- 
Cheers,

David



More information about the linux-arm-kernel mailing list