Skip to content

Commit cfdf645

Browse files
committed
tools headers: Sync uapi/linux/prctl.h with the kernel source
To pick up the changes in these csets: 5ca243f ("prctl: add arch-agnostic prctl()s for indirect branch tracking") 28621ec ("rseq: Add prctl() to enable time slice extensions") That don't introduced these new prctls: $ tools/perf/trace/beauty/prctl_option.sh > before.txt $ cp include/uapi/linux/prctl.h tools/perf/trace/beauty/include/uapi/linux/prctl.h $ tools/perf/trace/beauty/prctl_option.sh > after.txt $ diff -u before.txt after.txt --- before.txt 2026-02-27 09:07:16.435611457 -0300 +++ after.txt 2026-02-27 09:07:28.189816531 -0300 @@ -73,6 +73,10 @@ [76] = "LOCK_SHADOW_STACK_STATUS", [77] = "TIMER_CREATE_RESTORE_IDS", [78] = "FUTEX_HASH", + [79] = "RSEQ_SLICE_EXTENSION", + [80] = "GET_INDIR_BR_LP_STATUS", + [81] = "SET_INDIR_BR_LP_STATUS", + [82] = "LOCK_INDIR_BR_LP_STATUS", }; static const char *prctl_set_mm_options[] = { [1] = "START_CODE", $ That now will be used to decode the syscall option and also to compose filters, for instance: [root@five ~]# perf trace -e syscalls:sys_enter_prctl --filter option==SET_NAME 0.000 Isolated Servi/3474327 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23f13b7aee) 0.032 DOM Worker/3474327 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23deb25670) 7.920 :3474328/3474328 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24fbb10) 7.935 StreamT~s #374/3474328 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24fb970) 8.400 Isolated Servi/3474329 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24bab10) 8.418 StreamT~s #374/3474329 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7f23e24ba970) ^C[root@five ~]# This addresses these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/linux/prctl.h include/uapi/linux/prctl.h Please see tools/include/uapi/README for further details. Cc: Deepak Gupta <debug@rivosinc.com> Cc: Paul Walmsley <pjw@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 0031c06 commit cfdf645

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

  • tools/perf/trace/beauty/include/uapi/linux

tools/perf/trace/beauty/include/uapi/linux/prctl.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,4 +386,41 @@ struct prctl_mm_map {
386386
# define PR_FUTEX_HASH_SET_SLOTS 1
387387
# define PR_FUTEX_HASH_GET_SLOTS 2
388388

389+
/* RSEQ time slice extensions */
390+
#define PR_RSEQ_SLICE_EXTENSION 79
391+
# define PR_RSEQ_SLICE_EXTENSION_GET 1
392+
# define PR_RSEQ_SLICE_EXTENSION_SET 2
393+
/*
394+
* Bits for RSEQ_SLICE_EXTENSION_GET/SET
395+
* PR_RSEQ_SLICE_EXT_ENABLE: Enable
396+
*/
397+
# define PR_RSEQ_SLICE_EXT_ENABLE 0x01
398+
399+
/*
400+
* Get the current indirect branch tracking configuration for the current
401+
* thread, this will be the value configured via PR_SET_INDIR_BR_LP_STATUS.
402+
*/
403+
#define PR_GET_INDIR_BR_LP_STATUS 80
404+
405+
/*
406+
* Set the indirect branch tracking configuration. PR_INDIR_BR_LP_ENABLE will
407+
* enable cpu feature for user thread, to track all indirect branches and ensure
408+
* they land on arch defined landing pad instruction.
409+
* x86 - If enabled, an indirect branch must land on an ENDBRANCH instruction.
410+
* arch64 - If enabled, an indirect branch must land on a BTI instruction.
411+
* riscv - If enabled, an indirect branch must land on an lpad instruction.
412+
* PR_INDIR_BR_LP_DISABLE will disable feature for user thread and indirect
413+
* branches will no more be tracked by cpu to land on arch defined landing pad
414+
* instruction.
415+
*/
416+
#define PR_SET_INDIR_BR_LP_STATUS 81
417+
# define PR_INDIR_BR_LP_ENABLE (1UL << 0)
418+
419+
/*
420+
* Prevent further changes to the specified indirect branch tracking
421+
* configuration. All bits may be locked via this call, including
422+
* undefined bits.
423+
*/
424+
#define PR_LOCK_INDIR_BR_LP_STATUS 82
425+
389426
#endif /* _LINUX_PRCTL_H */

0 commit comments

Comments
 (0)