diff options
author | 2022-05-12 20:22:54 -0700 | |
---|---|---|
committer | 2022-05-13 07:20:11 -0700 | |
commit | c64e912c865a1a0df1c312bca946985eb095afa5 (patch) | |
tree | 0f4079b1810d585935f91894e3e9bf845371ee7b /include/linux/hugetlb.h | |
parent | mm/hugetlb: handle UFFDIO_WRITEPROTECT (diff) | |
download | linux-rng-c64e912c865a1a0df1c312bca946985eb095afa5.tar.xz linux-rng-c64e912c865a1a0df1c312bca946985eb095afa5.zip |
mm/hugetlb: handle pte markers in page faults
Allow hugetlb code to handle pte markers just like none ptes. It's mostly
there, we just need to make sure we don't assume hugetlb_no_page() only
handles none pte, so when detecting pte change we should use pte_same()
rather than pte_none(). We need to pass in the old_pte to do the
comparison.
Check the original pte to see whether it's a pte marker, if it is, we
should recover uffd-wp bit on the new pte to be installed, so that the
next write will be trapped by uffd.
Link: https://lkml.kernel.org/r/20220405014909.14761-1-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: "Kirill A . Shutemov" <kirill@shutemov.name>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Nadav Amit <nadav.amit@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/hugetlb.h')
0 files changed, 0 insertions, 0 deletions