diff options
author | Ryan Roberts <ryan.roberts@arm.com> | 2024-01-23 15:17:55 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-02-08 06:20:33 +0100 |
commit | 56ae10cf628b02279980d17439c6241a643959c2 (patch) | |
tree | 609fc879bf1a6b622980e3c155c62fc769f3058e /drivers | |
parent | exit: wait_task_zombie: kill the no longer necessary spin_lock_irq(siglock) (diff) | |
download | linux-56ae10cf628b02279980d17439c6241a643959c2.tar.xz linux-56ae10cf628b02279980d17439c6241a643959c2.zip |
mm/userfaultfd: UFFDIO_MOVE implementation should use ptep_get()
Commit c33c794828f2 ("mm: ptep_get() conversion") converted all (non-arch)
call sites to use ptep_get() instead of doing a direct dereference of the
pte. Full rationale can be found in that commit's log.
Since then, UFFDIO_MOVE has been implemented which does 7 direct pte
dereferences. Let's fix those up to use ptep_get().
I've asserted in the past that there is no reliable automated mechanism to
catch these; I'm relying on a combination of Coccinelle (which throws up a
lot of false positives) and some compiler magic to force a compiler error
on dereference. But given the frequency with which new issues are coming
up, I'll add it to my todo list to try to find an automated solution.
Link: https://lkml.kernel.org/r/20240123141755.3836179-1-ryan.roberts@arm.com
Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions