]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
selftests/seccomp: Use __NR_mknodat instead of __NR_mknod
authorKees Cook <keescook@chromium.org>
Sat, 12 Sep 2020 11:08:20 +0000 (04:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:11:07 +0000 (10:11 +0100)
[ Upstream commit 05b52c6625278cc6ed1245a569167f86a971ff86 ]

The __NR_mknod syscall doesn't exist on arm64 (only __NR_mknodat).
Switch to the modern syscall.

Fixes: ad5682184a81 ("selftests/seccomp: Check for EPOLLHUP for user_notif")
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/lkml/20200912110820.597135-16-keescook@chromium.org
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/seccomp/seccomp_bpf.c

index 7a6d40286a421c6304fa7557dd43c0ddee2438a5..9dc13be8fe5f5be2a875f252101c2e8b592439ac 100644 (file)
@@ -3715,7 +3715,7 @@ TEST(user_notification_filter_empty)
        if (pid == 0) {
                int listener;
 
-               listener = user_notif_syscall(__NR_mknod, SECCOMP_FILTER_FLAG_NEW_LISTENER);
+               listener = user_notif_syscall(__NR_mknodat, SECCOMP_FILTER_FLAG_NEW_LISTENER);
                if (listener < 0)
                        _exit(EXIT_FAILURE);