Skip to content

Commit da42b52

Browse files
committed
tools headers: Update the syscall tables and unistd.h, mostly to support the new 'mseal' syscall
But also to wire up shadow stacks on 32-bit x86, picking up those changes from these csets: ff388fe ("mseal: wire up mseal syscall") 2883f01 ("x86/shstk: Enable shadow stacks for x32") This makes 'perf trace' support it, now its possible, for instance to do: # perf trace -e mseal --max-stack=16 Here is an example with the 'sendmmsg' syscall: root@x1:~# perf trace -e sendmmsg --max-stack 16 --max-events=1 0.000 ( 0.062 ms): dbus-broker/1012 sendmmsg(fd: 150, mmsg: 0x7ffef57cca50, vlen: 1, flags: DONTWAIT|NOSIGNAL) = 1 syscall_exit_to_user_mode_prepare ([kernel.kallsyms]) syscall_exit_to_user_mode_prepare ([kernel.kallsyms]) syscall_exit_to_user_mode ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64 ([kernel.kallsyms]) [0x117ce7] (/usr/lib64/libc.so.6 (deleted)) root@x1:~# To do a system wide tracing of the new 'mseal' syscall with a backtrace of at most 16 entries. This addresses these perf tools build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl Cc: Adrian Hunter <[email protected]> Cc: Andrew Morton <[email protected]> Cc: H J Lu <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jeff Xu <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/lkml/ZlXlo4TNcba4wnVZ@x1 Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 001821b commit da42b52

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

tools/include/uapi/asm-generic/unistd.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,11 @@ __SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr)
842842
#define __NR_lsm_list_modules 461
843843
__SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)
844844

845+
#define __NR_mseal 462
846+
__SYSCALL(__NR_mseal, sys_mseal)
847+
845848
#undef __NR_syscalls
846-
#define __NR_syscalls 462
849+
#define __NR_syscalls 463
847850

848851
/*
849852
* 32 bit systems traditionally used different

tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,3 +376,4 @@
376376
459 n64 lsm_get_self_attr sys_lsm_get_self_attr
377377
460 n64 lsm_set_self_attr sys_lsm_set_self_attr
378378
461 n64 lsm_list_modules sys_lsm_list_modules
379+
462 n64 mseal sys_mseal

tools/perf/arch/powerpc/entry/syscalls/syscall.tbl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,3 +548,4 @@
548548
459 common lsm_get_self_attr sys_lsm_get_self_attr
549549
460 common lsm_set_self_attr sys_lsm_set_self_attr
550550
461 common lsm_list_modules sys_lsm_list_modules
551+
462 common mseal sys_mseal

tools/perf/arch/s390/entry/syscalls/syscall.tbl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,3 +464,4 @@
464464
459 common lsm_get_self_attr sys_lsm_get_self_attr sys_lsm_get_self_attr
465465
460 common lsm_set_self_attr sys_lsm_set_self_attr sys_lsm_set_self_attr
466466
461 common lsm_list_modules sys_lsm_list_modules sys_lsm_list_modules
467+
462 common mseal sys_mseal sys_mseal

tools/perf/arch/x86/entry/syscalls/syscall_64.tbl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@
374374
450 common set_mempolicy_home_node sys_set_mempolicy_home_node
375375
451 common cachestat sys_cachestat
376376
452 common fchmodat2 sys_fchmodat2
377-
453 64 map_shadow_stack sys_map_shadow_stack
377+
453 common map_shadow_stack sys_map_shadow_stack
378378
454 common futex_wake sys_futex_wake
379379
455 common futex_wait sys_futex_wait
380380
456 common futex_requeue sys_futex_requeue
@@ -383,6 +383,7 @@
383383
459 common lsm_get_self_attr sys_lsm_get_self_attr
384384
460 common lsm_set_self_attr sys_lsm_set_self_attr
385385
461 common lsm_list_modules sys_lsm_list_modules
386+
462 common mseal sys_mseal
386387

387388
#
388389
# Due to a historical design error, certain syscalls are numbered differently

0 commit comments

Comments
 (0)