--- a/tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftests-use-user-mode-only +++ a/tools/testing/selftests/vm/userfaultfd.c @@ -831,7 +831,7 @@ static int userfaultfd_open_ext(uint64_t { struct uffdio_api uffdio_api; - uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK); + uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK | UFFD_USER_MODE_ONLY); if (uffd < 0) { fprintf(stderr, "userfaultfd syscall not available in this kernel\n");