[PATCH v2 5/6] mm/page_vma_mapped: use huge_ptep_get() for hugetlb
Muchun Song
muchun.song at linux.dev
Thu Jul 2 01:33:06 PDT 2026
> On Jul 2, 2026, at 13:13, Dev Jain <dev.jain at arm.com> 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>
Reviewed-by: Muchun Song <muchun.song at linux.dev>
Thanks.
More information about the linux-arm-kernel
mailing list