linux/tools/testing/selftests/vm
Peter Collingbourne 0db282ba2c selftest: use mmap instead of posix_memalign to allocate memory
This test passes pointers obtained from anon_allocate_area to the
userfaultfd and mremap APIs.  This causes a problem if the system
allocator returns tagged pointers because with the tagged address ABI
the kernel rejects tagged addresses passed to these APIs, which would
end up causing the test to fail.  To make this test compatible with such
system allocators, stop using the system allocator to allocate memory in
anon_allocate_area, and instead just use mmap.

Link: https://lkml.kernel.org/r/20210714195437.118982-3-pcc@google.com
Link: https://linux-review.googlesource.com/id/Icac91064fcd923f77a83e8e133f8631c5b8fc241
Fixes: c47174fc36 ("userfaultfd: selftest")
Co-developed-by: Lokesh Gidra <lokeshgidra@google.com>
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Alistair Delva <adelva@google.com>
Cc: William McVicker <willmcvicker@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Mitch Phillips <mitchp@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: <stable@vger.kernel.org>	[5.4]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-07-23 17:43:28 -07:00
..
.gitignore secretmem: test: add basic selftest for memfd_secret(2) 2021-07-08 11:48:21 -07:00
Makefile secretmem: test: add basic selftest for memfd_secret(2) 2021-07-08 11:48:21 -07:00
charge_reserved_hugetlb.sh
check_config.sh
compaction_test.c
config
gup_test.c mm/gup_benchmark: support threading 2021-06-29 10:53:48 -07:00
hmm-tests.c mm: selftests for exclusive device memory 2021-07-01 11:06:03 -07:00
hugepage-mmap.c
hugepage-shm.c
hugetlb_reparenting_test.sh
khugepaged.c khugepaged: selftests: remove debug_cow 2021-06-30 20:47:26 -07:00
madv_populate.c selftests/vm: add test for MADV_POPULATE_(READ|WRITE) 2021-06-30 20:47:31 -07:00
map_fixed_noreplace.c
map_hugetlb.c
map_populate.c
memfd_secret.c secretmem: test: add basic selftest for memfd_secret(2) 2021-07-08 11:48:21 -07:00
mlock-random-test.c
mlock2-tests.c
mlock2.h
mremap_dontunmap.c
mremap_test.c selftest/mremap_test: avoid crash with static build 2021-07-08 11:48:22 -07:00
on-fault-limit.c
pkey-helpers.h
pkey-powerpc.h
pkey-x86.h selftests/vm/pkeys: exercise x86 XSAVE init state 2021-07-01 11:06:06 -07:00
protection_keys.c selftests/vm/pkeys: exercise x86 XSAVE init state 2021-07-01 11:06:06 -07:00
run_vmtests.sh secretmem: test: add basic selftest for memfd_secret(2) 2021-07-08 11:48:21 -07:00
split_huge_page_test.c mm: huge_memory: debugfs for file-backed THP split 2021-05-05 11:27:21 -07:00
test_hmm.sh
test_vmalloc.sh
thuge-gen.c
transhuge-stress.c
userfaultfd.c selftest: use mmap instead of posix_memalign to allocate memory 2021-07-23 17:43:28 -07:00
va_128TBswitch.c
virtual_address_range.c
write_hugetlb_memory.sh
write_to_hugetlbfs.c