Re: [PATCH 2/3] userfaultfd: UFFDIO_REMAP uABI

From: Jann Horn
Date: Thu Sep 21 2023 - 13:02:58 EST


On Thu, Sep 14, 2023 at 9:28 PM Jann Horn <jannh@xxxxxxxxxx> wrote:
> Though, uuuuuh, I guess if that's true, the existing
> vma_is_anonymous() is broken, since that also just checks ->vm_ops?
> I'm not sure what the consequences of that would be... Either way,
> vma_is_anonymous() might be the better way to check for anonymous VMAs
> here, and someone should figure out whether vma_is_anonymous() needs
> to be fixed.

(Not really relevant to the rest of the thread, but just as a
sidenote: Turns out this is not an issue; since commit bfd40eaff5ab
("mm: fix vma_is_anonymous() false-positives"), VMAs where the ->mmap
handler does not set an operations pointer end up with a dummy
operations pointer.)