The patch titled Subject: userfaultfd/selftests: hint the test runner on required privilege has been added to the -mm tree. Its filename is userfaultfd-selftests-hint-the-test-runner-on-required-privilege.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/userfaultfd-selftests-hint-the-test-runner-on-required-privilege.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/userfaultfd-selftests-hint-the-test-runner-on-required-privilege.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Peter Xu <peterx@xxxxxxxxxx> Subject: userfaultfd/selftests: hint the test runner on required privilege Now userfaultfd test program requires either root or ptrace privilege due to the signal/event tests. When UFFDIO_API failed, hint the test runner about this fact verbosely. Link: https://lkml.kernel.org/r/20201208024709.7701-4-peterx@xxxxxxxxxx Signed-off-by: Peter Xu <peterx@xxxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/vm/userfaultfd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/tools/testing/selftests/vm/userfaultfd.c~userfaultfd-selftests-hint-the-test-runner-on-required-privilege +++ a/tools/testing/selftests/vm/userfaultfd.c @@ -794,7 +794,8 @@ static int userfaultfd_open(int features uffdio_api.api = UFFD_API; uffdio_api.features = features; if (ioctl(uffd, UFFDIO_API, &uffdio_api)) { - fprintf(stderr, "UFFDIO_API\n"); + fprintf(stderr, "UFFDIO_API failed.\nPlease make sure to " + "run with either root or ptrace capability.\n"); return 1; } if (uffdio_api.api != UFFD_API) { _ Patches currently in -mm which might be from peterx@xxxxxxxxxx are userfaultfd-selftests-always-dump-something-in-modes.patch userfaultfd-selftests-fix-retval-check-for-userfaultfd_open.patch userfaultfd-selftests-hint-the-test-runner-on-required-privilege.patch