Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/[email protected] Link: https://linux-review.googlesource.com/id/Icac91064fcd923f77a83e8e133f8631c5b8fc241 Fixes: c47174f ("userfaultfd: selftest") Co-developed-by: Lokesh Gidra <[email protected]> Signed-off-by: Lokesh Gidra <[email protected]> Signed-off-by: Peter Collingbourne <[email protected]> Reviewed-by: Catalin Marinas <[email protected]> Cc: Vincenzo Frascino <[email protected]> Cc: Dave Martin <[email protected]> Cc: Will Deacon <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Alistair Delva <[email protected]> Cc: William McVicker <[email protected]> Cc: Evgenii Stepanov <[email protected]> Cc: Mitch Phillips <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: <[email protected]> [5.4] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information