Skip to content

Commit 8326c79

Browse files
committed
tools headers UAPI: Sync x86 arch prctl headers with the kernel sources
To pick the changes in this cset: 980fe2f ("x86/fpu: Extend fpu_xstate_prctl() with guest permissions") This picks these new prctls: $ tools/perf/trace/beauty/x86_arch_prctl.sh > /tmp/before $ cp arch/x86/include/uapi/asm/prctl.h tools/arch/x86/include/uapi/asm/prctl.h $ tools/perf/trace/beauty/x86_arch_prctl.sh > /tmp/after $ diff -u /tmp/before /tmp/after --- /tmp/before 2022-01-19 14:40:05.049394977 -0300 +++ /tmp/after 2022-01-19 14:40:35.628154565 -0300 @@ -9,6 +9,8 @@ [0x1021 - 0x1001]= "GET_XCOMP_SUPP", [0x1022 - 0x1001]= "GET_XCOMP_PERM", [0x1023 - 0x1001]= "REQ_XCOMP_PERM", + [0x1024 - 0x1001]= "GET_XCOMP_GUEST_PERM", + [0x1025 - 0x1001]= "REQ_XCOMP_GUEST_PERM", }; #define x86_arch_prctl_codes_2_offset 0x2001 $ With this 'perf trace' can translate those numbers into strings and use the strings in filter expressions: # perf trace -e prctl 0.000 ( 0.011 ms): DOM Worker/3722622 prctl(option: SET_NAME, arg2: 0x7f9c014b7df5) = 0 0.032 ( 0.002 ms): DOM Worker/3722622 prctl(option: SET_NAME, arg2: 0x7f9bb6b51580) = 0 5.452 ( 0.003 ms): StreamT~ns #30/3722623 prctl(option: SET_NAME, arg2: 0x7f9bdbdfeb70) = 0 5.468 ( 0.002 ms): StreamT~ns #30/3722623 prctl(option: SET_NAME, arg2: 0x7f9bdbdfea70) = 0 24.494 ( 0.009 ms): IndexedDB #556/3722624 prctl(option: SET_NAME, arg2: 0x7f562a32ae28) = 0 24.540 ( 0.002 ms): IndexedDB #556/3722624 prctl(option: SET_NAME, arg2: 0x7f563c6d4b30) = 0 670.281 ( 0.008 ms): systemd-userwo/3722339 prctl(option: SET_NAME, arg2: 0x564be30805c8) = 0 670.293 ( 0.002 ms): systemd-userwo/3722339 prctl(option: SET_NAME, arg2: 0x564be30800f0) = 0 ^C# This addresses these perf build warnings: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/prctl.h' differs from latest version at 'arch/x86/include/uapi/asm/prctl.h' diff -u tools/arch/x86/include/uapi/asm/prctl.h arch/x86/include/uapi/asm/prctl.h Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 9d5f0c3 commit 8326c79

File tree

1 file changed

+14
-12
lines changed
  • tools/arch/x86/include/uapi/asm

1 file changed

+14
-12
lines changed

tools/arch/x86/include/uapi/asm/prctl.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
#ifndef _ASM_X86_PRCTL_H
33
#define _ASM_X86_PRCTL_H
44

5-
#define ARCH_SET_GS 0x1001
6-
#define ARCH_SET_FS 0x1002
7-
#define ARCH_GET_FS 0x1003
8-
#define ARCH_GET_GS 0x1004
5+
#define ARCH_SET_GS 0x1001
6+
#define ARCH_SET_FS 0x1002
7+
#define ARCH_GET_FS 0x1003
8+
#define ARCH_GET_GS 0x1004
99

10-
#define ARCH_GET_CPUID 0x1011
11-
#define ARCH_SET_CPUID 0x1012
10+
#define ARCH_GET_CPUID 0x1011
11+
#define ARCH_SET_CPUID 0x1012
1212

13-
#define ARCH_GET_XCOMP_SUPP 0x1021
14-
#define ARCH_GET_XCOMP_PERM 0x1022
15-
#define ARCH_REQ_XCOMP_PERM 0x1023
13+
#define ARCH_GET_XCOMP_SUPP 0x1021
14+
#define ARCH_GET_XCOMP_PERM 0x1022
15+
#define ARCH_REQ_XCOMP_PERM 0x1023
16+
#define ARCH_GET_XCOMP_GUEST_PERM 0x1024
17+
#define ARCH_REQ_XCOMP_GUEST_PERM 0x1025
1618

17-
#define ARCH_MAP_VDSO_X32 0x2001
18-
#define ARCH_MAP_VDSO_32 0x2002
19-
#define ARCH_MAP_VDSO_64 0x2003
19+
#define ARCH_MAP_VDSO_X32 0x2001
20+
#define ARCH_MAP_VDSO_32 0x2002
21+
#define ARCH_MAP_VDSO_64 0x2003
2022

2123
#endif /* _ASM_X86_PRCTL_H */

0 commit comments

Comments
 (0)