Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools include UAPI: Sync x86's syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open

05a70a8ec287 ("unistd: protect clone3 via __ARCH_WANT_SYS_CLONE3")
8f3220a80654 ("arch: wire-up clone3() syscall")
7615d9e1780e ("arch: wire-up pidfd_open()")

Silencing the following tools/perf build warnings

Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h'
diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl

Now 'perf trace -e pidfd*,clone*' will trace those syscalls as well as the
others with those prefixes.

$ diff -u /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.before /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c
--- /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.before 2019-07-26 12:24:55.020944201 -0300
+++ /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c 2019-07-26 12:25:03.919047217 -0300
@@ -344,5 +344,7 @@
[431] = "fsconfig",
[432] = "fsmount",
[433] = "fspick",
+ [434] = "pidfd_open",
+ [435] = "clone3",
};
-#define SYSCALLTBL_x86_64_MAX_ID 433
+#define SYSCALLTBL_x86_64_MAX_ID 435
$

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Christian Brauner <christian@brauner.io>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-0isnnqxtr1ihz6p8wzjiy47d@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+9 -1
+7 -1
tools/include/uapi/asm-generic/unistd.h
··· 844 844 __SYSCALL(__NR_fsmount, sys_fsmount) 845 845 #define __NR_fspick 433 846 846 __SYSCALL(__NR_fspick, sys_fspick) 847 + #define __NR_pidfd_open 434 848 + __SYSCALL(__NR_pidfd_open, sys_pidfd_open) 849 + #ifdef __ARCH_WANT_SYS_CLONE3 850 + #define __NR_clone3 435 851 + __SYSCALL(__NR_clone3, sys_clone3) 852 + #endif 847 853 848 854 #undef __NR_syscalls 849 - #define __NR_syscalls 434 855 + #define __NR_syscalls 436 850 856 851 857 /* 852 858 * 32 bit systems traditionally used different
+2
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
··· 355 355 431 common fsconfig __x64_sys_fsconfig 356 356 432 common fsmount __x64_sys_fsmount 357 357 433 common fspick __x64_sys_fspick 358 + 434 common pidfd_open __x64_sys_pidfd_open 359 + 435 common clone3 __x64_sys_clone3/ptregs 358 360 359 361 # 360 362 # x32-specific system call numbers start at 512 to avoid cache impact