• David Hildenbrand's avatar
    selftests/vm: cow: R/O long-term pinning reliability tests for non-anon pages · 97713a3a
    David Hildenbrand authored
    Let's test whether R/O long-term pinning is reliable for non-anonymous
    memory: when R/O long-term pinning a page, the expectation is that we
    break COW early before pinning, such that actual write access via the
    page tables won't break COW later and end up replacing the R/O-pinned
    page in the page table.
    
    Consequently, R/O long-term pinning in private mappings would only target
    exclusive anonymous pages.
    
    For now, all tests fail:
    	# [RUN] R/O longterm GUP pin ... with shared zeropage
    	not ok 151 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP pin ... with memfd
    	not ok 152 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP pin ... with tmpfile
    	not ok 153 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP pin ... with huge zeropage
    	not ok 154 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP pin ... with memfd hugetlb (2048 kB)
    	not ok 155 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP pin ... with memfd hugetlb (1048576 kB)
    	not ok 156 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP-fast pin ... with shared zeropage
    	not ok 157 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP-fast pin ... with memfd
    	not ok 158 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP-fast pin ... with tmpfile
    	not ok 159 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP-fast pin ... with huge zeropage
    	not ok 160 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP-fast pin ... with memfd hugetlb (2048 kB)
    	not ok 161 Longterm R/O pin is reliable
    	# [RUN] R/O longterm GUP-fast pin ... with memfd hugetlb (1048576 kB)
    	not ok 162 Longterm R/O pin is reliable
    
    Link: https://lkml.kernel.org/r/20221116102659.70287-4-david@redhat.comSigned-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    97713a3a
cow.c 36.4 KB