Re: [PATCH v2 1/2] userfaultfd: Fix checks for huge PMDs

From: Jann Horn
Date: Tue Aug 13 2024 - 16:45:02 EST


On Tue, Aug 13, 2024 at 10:37 PM David Hildenbrand <david@xxxxxxxxxx> wrote:
> On 13.08.24 22:25, Jann Horn wrote:
> > + if (unlikely(!pmd_present(dst_pmdval) || pmd_trans_huge(dst_pmdval) ||
> > + pmd_devmap(dst_pmdval))) {
>
> Likely in the future we should turn the latter part into a "pmd_leaf()"
> check.

Yeah, it'd be a good idea to refactor that as a followup.