perf tools: Sync tools and kernel headers for v6.13
Subsystems (8)
Namhyung Kim
maintainercover perf tools: Sync tools and kernel headers for v6.13
Hello,
I'll carry these changes on the perf tools tree to update perf tools to understand new syscalls and parameters. You can refer to README file in the tools/include/uapi directory why it's needed.
Thanks,
Namhyung
Namhyung Kim (11):
tools headers: Sync uapi/drm/drm.h with the kernel sources tools headers: Sync uapi/linux/perf_event.h with the kernel sources tools headers: Sync uapi/linux/kvm.h with the kernel sources tools headers: Sync x86 kvm and cpufeature headers with the kernel tools headers: Sync arm64 kvm header with the kernel sources tools headers: Sync *xattrat syscall changes with the kernel sources tools headers: Sync uapi/asm-generic/mman.h with the kernel sources tools headers: Sync uapi/linux/fcntl.h with the kernel sources tools headers: Sync uapi/linux/mount.h with the kernel sources tools headers: Sync uapi/linux/prctl.h with the kernel sources perf tools: Fix build error on generated/fs_at_flags_array.c
tools/arch/arm64/include/uapi/asm/kvm.h | 6 +++++ tools/arch/x86/include/asm/cpufeatures.h | 11 ++++++-- tools/arch/x86/include/uapi/asm/kvm.h | 1 + tools/include/uapi/asm-generic/mman.h | 4 +++ tools/include/uapi/asm-generic/unistd.h | 11 +++++++- tools/include/uapi/drm/drm.h | 17 ++++++++++++ tools/include/uapi/linux/kvm.h | 8 ++++++ tools/include/uapi/linux/perf_event.h | 11 +++++++- .../arch/mips/entry/syscalls/syscall_n64.tbl | 4 +++ .../arch/powerpc/entry/syscalls/syscall.tbl | 4 +++ .../perf/arch/s390/entry/syscalls/syscall.tbl | 4 +++ .../arch/x86/entry/syscalls/syscall_32.tbl | 4 +++ .../arch/x86/entry/syscalls/syscall_64.tbl | 4 +++ tools/perf/trace/beauty/fs_at_flags.sh | 3 ++- .../trace/beauty/include/uapi/linux/fcntl.h | 5 +--- .../trace/beauty/include/uapi/linux/mount.h | 14 ++++++++-- .../trace/beauty/include/uapi/linux/prctl.h | 27 ++++++++++++++++++- 17 files changed, 126 insertions(+), 12 deletions(-)
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 1/11 tools headers: Sync uapi/drm/drm.h with the kernel sources
To pick up the changes in this cset:
56c594d8df64e726 ("drm: add DRM_SET_CLIENT_NAME ioctl")
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h
Please see tools/include/uapi/README for further details.
--- tools/include/uapi/drm/drm.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
tools/include/uapi/drm/drm.h +17 -0
@@ -1024,6 +1024,13 @@ struct drm_crtc_queue_sequence {__u64 user_data;/* user data passed to event */ }; +#define DRM_CLIENT_NAME_MAX_LEN 64 +struct drm_set_client_name { +__u64 name_len; +__u64 name; +}; + +#if defined(__cplusplus) }#endif
@@ -1288,6 +1295,16 @@ extern "C" {*/ #define DRM_IOCTL_MODE_CLOSEFB DRM_IOWR(0xD0, struct drm_mode_closefb) +/** +* DRM_IOCTL_SET_CLIENT_NAME - Attach a name to a drm_file +* +* Having a name allows for easier tracking and debugging. +* The length of the name (without null ending char) must be +* <= DRM_CLIENT_NAME_MAX_LEN. +* The call will fail if the name contains whitespaces or non-printable chars. +*/ +#define DRM_IOCTL_SET_CLIENT_NAME DRM_IOWR(0xD1, struct drm_set_client_name) +/* * Device specific ioctls should only be in their respective headers * The device specific ioctl range is from 0x40 to 0x9f.
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 2/11 tools headers: Sync uapi/linux/perf_event.h with the kernel sources
In reply to Namhyung KimTo pick up the changes in this cset:
18d92bb57c39504d ("perf/core: Add aux_pause, aux_resume, aux_start_paused")
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h
Please see tools/include/uapi/README for further details.
--- tools/include/uapi/linux/perf_event.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
tools/include/uapi/linux/perf_event.h +10 -1
@@ -511,7 +511,16 @@ struct perf_event_attr {__u16 sample_max_stack;__u16 __reserved_2;__u32 aux_sample_size; -__u32 __reserved_3; + +union { +__u32 aux_action; +struct { +__u32 aux_start_paused :1 ,/* start AUX area tracing paused */ + aux_pause :1 ,/* on overflow, pause AUX area tracing */ + aux_resume :1 ,/* on overflow, resume AUX area tracing */ + __reserved_3 :29 ; + }; + };/* * User provided data if sigtrap=1, passed back to user via
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 3/11 tools headers: Sync uapi/linux/kvm.h with the kernel sources
In reply to Namhyung KimTo pick up the changes in this cset:
e785dfacf7e7fe94 ("LoongArch: KVM: Add PCHPIC device support") 2e8b9df82631e714 ("LoongArch: KVM: Add EIOINTC device support") c532de5a67a70f85 ("LoongArch: KVM: Add IPI device support")
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
Please see tools/include/uapi/README for further details.
--- tools/include/uapi/linux/kvm.h | 8 ++++++++ 1 file changed, 8 insertions(+)
tools/include/uapi/linux/kvm.h +8 -0
@@ -1158,7 +1158,15 @@ enum kvm_device_type {#define KVM_DEV_TYPE_ARM_PV_TIME KVM_DEV_TYPE_ARM_PV_TIME KVM_DEV_TYPE_RISCV_AIA,#define KVM_DEV_TYPE_RISCV_AIA KVM_DEV_TYPE_RISCV_AIA + KVM_DEV_TYPE_LOONGARCH_IPI, +#define KVM_DEV_TYPE_LOONGARCH_IPI KVM_DEV_TYPE_LOONGARCH_IPI + KVM_DEV_TYPE_LOONGARCH_EIOINTC, +#define KVM_DEV_TYPE_LOONGARCH_EIOINTC KVM_DEV_TYPE_LOONGARCH_EIOINTC + KVM_DEV_TYPE_LOONGARCH_PCHPIC, +#define KVM_DEV_TYPE_LOONGARCH_PCHPIC KVM_DEV_TYPE_LOONGARCH_PCHPIC + KVM_DEV_TYPE_MAX, + };struct kvm_vfio_spapr_tce {
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 4/11 tools headers: Sync x86 kvm and cpufeature headers with the kernel
In reply to Namhyung KimTo pick up the changes in this cset:
a0423af92cb31e6f ("x86: KVM: Advertise CPUIDs for new instructions in Clearwater Forest") 0c487010cb4f79e4 ("x86/cpufeatures: Add X86_FEATURE_AMD_WORKLOAD_CLASS feature bit") 1ad4667066714369 ("x86/cpufeatures: Add X86_FEATURE_AMD_HETEROGENEOUS_CORES") 104edc6efca62838 ("x86/cpufeatures: Rename X86_FEATURE_FAST_CPPC to have AMD prefix") 3ea87dfa31a7b0bb ("x86/cpufeatures: Add a IBPB_NO_RET BUG flag") ff898623af2ed564 ("x86/cpufeatures: Define X86_FEATURE_AMD_IBPB_RET") dcb988cdac85bad1 ("KVM: x86: Quirk initialization of feature MSRs to KVM's max configuration")
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h
Please see tools/include/uapi/README for further details.
--- tools/arch/x86/include/asm/cpufeatures.h | 11 +++++++++-- tools/arch/x86/include/uapi/asm/kvm.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-)
tools/arch/x86/include/asm/cpufeatures.h +9 -2
@@ -215,7 +215,7 @@#define X86_FEATURE_SPEC_STORE_BYPASS_DISABLE ( 7*32+23)/* Disable Speculative Store Bypass. */ #define X86_FEATURE_LS_CFG_SSBD ( 7*32+24)/* AMD SSBD implementation via LS_CFG MSR */ #define X86_FEATURE_IBRS ( 7*32+25)/* "ibrs" Indirect Branch Restricted Speculation */ -#define X86_FEATURE_IBPB ( 7*32+26)/* "ibpb" Indirect Branch Prediction Barrier */ +#define X86_FEATURE_IBPB ( 7*32+26)/* "ibpb" Indirect Branch Prediction Barrier without a guaranteed RSB flush */ #define X86_FEATURE_STIBP ( 7*32+27)/* "stibp" Single Thread Indirect Branch Predictors */ #define X86_FEATURE_ZEN ( 7*32+28)/* Generic flag for all Zen and newer */ #define X86_FEATURE_L1TF_PTEINV ( 7*32+29)/* L1TF workaround PTE inversion */
@@ -317,6 +317,9 @@#define X86_FEATURE_ZEN1 (11*32+31)/* CPU based on Zen1 microarchitecture */ /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */ +#define X86_FEATURE_SHA512 (12*32+ 0)/* SHA512 instructions */ +#define X86_FEATURE_SM3 (12*32+ 1)/* SM3 instructions */ +#define X86_FEATURE_SM4 (12*32+ 2)/* SM4 instructions */ #define X86_FEATURE_AVX_VNNI (12*32+ 4)/* "avx_vnni" AVX VNNI instructions */ #define X86_FEATURE_AVX512_BF16 (12*32+ 5)/* "avx512_bf16" AVX512 BFLOAT16 instructions */ #define X86_FEATURE_CMPCCXADD (12*32+ 7)/* CMPccXADD instructions */
@@ -348,6 +351,7 @@#define X86_FEATURE_CPPC (13*32+27)/* "cppc" Collaborative Processor Performance Control */ #define X86_FEATURE_AMD_PSFD (13*32+28)/* Predictive Store Forwarding Disable */ #define X86_FEATURE_BTC_NO (13*32+29)/* Not vulnerable to Branch Type Confusion */ +#define X86_FEATURE_AMD_IBPB_RET (13*32+30)/* IBPB clears return address predictor */ #define X86_FEATURE_BRS (13*32+31)/* "brs" Branch Sampling available */ /* Thermal and Power Management Leaf, CPUID level 0x00000006 (EAX), word 14 */
@@ -472,7 +476,9 @@#define X86_FEATURE_BHI_CTRL (21*32+ 2)/* BHI_DIS_S HW control available */ #define X86_FEATURE_CLEAR_BHB_HW (21*32+ 3)/* BHI_DIS_S HW control enabled */ #define X86_FEATURE_CLEAR_BHB_LOOP_ON_VMEXIT (21*32+ 4)/* Clear branch history at vmexit using SW loop */ -#define X86_FEATURE_AMD_FAST_CPPC (21*32 + 5)/* AMD Fast CPPC */ +#define X86_FEATURE_AMD_FAST_CPPC (21*32 + 5)/* Fast CPPC */ +#define X86_FEATURE_AMD_HETEROGENEOUS_CORES (21*32 + 6)/* Heterogeneous Core Topology */ +#define X86_FEATURE_AMD_WORKLOAD_CLASS (21*32 + 7)/* Workload Classification */ /* * BUG word(s)
@@ -523,4 +529,5 @@#define X86_BUG_DIV0 X86_BUG(1*32 + 1)/* "div0" AMD DIV0 speculation bug */ #define X86_BUG_RFDS X86_BUG(1*32 + 2)/* "rfds" CPU is vulnerable to Register File Data Sampling */ #define X86_BUG_BHI X86_BUG(1*32 + 3)/* "bhi" CPU is affected by Branch History Injection */ +#define X86_BUG_IBPB_NO_RET X86_BUG(1*32 + 4)/* "ibpb_no_ret" IBPB omits return target predictions */ #endif /* _ASM_X86_CPUFEATURES_H */
tools/arch/x86/include/uapi/asm/kvm.h +1 -0
@@ -440,6 +440,7 @@ struct kvm_sync_regs {#define KVM_X86_QUIRK_FIX_HYPERCALL_INSN (1 << 5)#define KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS (1 << 6)#define KVM_X86_QUIRK_SLOT_ZAP_ALL (1 << 7) +#define KVM_X86_QUIRK_STUFF_FEATURE_MSRS (1 << 8)#define KVM_STATE_NESTED_FORMAT_VMX 0#define KVM_STATE_NESTED_FORMAT_SVM 1
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 5/11 tools headers: Sync arm64 kvm header with the kernel sources
In reply to Namhyung KimTo pick up the changes in this cset:
97413cea1c48cc05 ("KVM: arm64: Add PSCI v1.3 SYSTEM_OFF2 function for hibernation")
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
Please see tools/include/uapi/README for further details.
--- tools/arch/arm64/include/uapi/asm/kvm.h | 6 ++++++ 1 file changed, 6 insertions(+)
tools/arch/arm64/include/uapi/asm/kvm.h +6 -0
@@ -484,6 +484,12 @@ enum {*/ #define KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 (1ULL << 0) +/* +* Shutdown caused by a PSCI v1.3 SYSTEM_OFF2 call. +* Valid only when the system event has a type of KVM_SYSTEM_EVENT_SHUTDOWN. +*/ +#define KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2 (1ULL << 0) +/* run->fail_entry.hardware_entry_failure_reason codes. */ #define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED (1ULL << 0)
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 6/11 tools headers: Sync *xattrat syscall changes with the kernel sources
In reply to Namhyung KimTo pick up the changes in this cset:
6140be90ec70c39f ("fs/xattr: add *at family syscalls")
This addresses these perf 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_32.tbl arch/x86/entry/syscalls/syscall_32.tbl 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
The arm64 changes are not included as it requires more changes in the tools. It'll be worked for the later cycle.
Please see tools/include/uapi/README for further details.
--- tools/include/uapi/asm-generic/unistd.h | 11 ++++++++++- tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl | 4 ++++ tools/perf/arch/powerpc/entry/syscalls/syscall.tbl | 4 ++++ tools/perf/arch/s390/entry/syscalls/syscall.tbl | 4 ++++ tools/perf/arch/x86/entry/syscalls/syscall_32.tbl | 4 ++++ tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 4 ++++ 6 files changed, 30 insertions(+), 1 deletion(-)
tools/include/uapi/asm-generic/unistd.h +10 -1
@@ -841,8 +841,17 @@ __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)#define __NR_mseal 462 __SYSCALL(__NR_mseal, sys_mseal) +#define __NR_setxattrat 463 +__SYSCALL(__NR_setxattrat, sys_setxattrat) +#define __NR_getxattrat 464 +__SYSCALL(__NR_getxattrat, sys_getxattrat) +#define __NR_listxattrat 465 +__SYSCALL(__NR_listxattrat, sys_listxattrat) +#define __NR_removexattrat 466 +__SYSCALL(__NR_removexattrat, sys_removexattrat) +#undef __NR_syscalls -#define __NR_syscalls 463 +#define __NR_syscalls 467/* * 32 bit systems traditionally used different
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl +4 -0
@@ -377,3 +377,7 @@ 460 n64 lsm_set_self_attr sys_lsm_set_self_attr 461 n64 lsm_list_modules sys_lsm_list_modules 462 n64 mseal sys_mseal +463 n64 setxattrat sys_setxattrat +464 n64 getxattrat sys_getxattrat +465 n64 listxattrat sys_listxattrat +466 n64 removexattrat sys_removexattrat
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl +4 -0
@@ -553,3 +553,7 @@ 460 common lsm_set_self_attr sys_lsm_set_self_attr 461 common lsm_list_modules sys_lsm_list_modules 462 common mseal sys_mseal +463 common setxattrat sys_setxattrat +464 common getxattrat sys_getxattrat +465 common listxattrat sys_listxattrat +466 common removexattrat sys_removexattrat
tools/perf/arch/s390/entry/syscalls/syscall.tbl +4 -0
@@ -465,3 +465,7 @@ 460 common lsm_set_self_attr sys_lsm_set_self_attr sys_lsm_set_self_attr 461 common lsm_list_modules sys_lsm_list_modules sys_lsm_list_modules 462 common mseal sys_mseal sys_mseal +463 common setxattrat sys_setxattrat sys_setxattrat +464 common getxattrat sys_getxattrat sys_getxattrat +465 common listxattrat sys_listxattrat sys_listxattrat +466 common removexattrat sys_removexattrat sys_removexattrat
tools/perf/arch/x86/entry/syscalls/syscall_32.tbl +4 -0
@@ -468,3 +468,7 @@ 460 i386 lsm_set_self_attr sys_lsm_set_self_attr 461 i386 lsm_list_modules sys_lsm_list_modules 462 i386 mseal sys_mseal +463 i386 setxattrat sys_setxattrat +464 i386 getxattrat sys_getxattrat +465 i386 listxattrat sys_listxattrat +466 i386 removexattrat sys_removexattrat
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl +4 -0
@@ -386,6 +386,10 @@ 460 common lsm_set_self_attr sys_lsm_set_self_attr 461 common lsm_list_modules sys_lsm_list_modules 462 common mseal sys_mseal +463 common setxattrat sys_setxattrat +464 common getxattrat sys_getxattrat +465 common listxattrat sys_listxattrat +466 common removexattrat sys_removexattrat # # Due to a historical design error, certain syscalls are numbered differently
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 7/11 tools headers: Sync uapi/asm-generic/mman.h with the kernel sources
In reply to Namhyung KimTo pick up the changes in this cset:
3630e82ab6bd2642 ("mman: Add map_shadow_stack() flags")
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/include/uapi/asm-generic/mman.h include/uapi/asm-generic/mman.h
Please see tools/include/uapi/README for further details.
--- tools/include/uapi/asm-generic/mman.h | 4 ++++ 1 file changed, 4 insertions(+)
tools/include/uapi/asm-generic/mman.h +4 -0
@@ -19,4 +19,8 @@#define MCL_FUTURE 2/* lock all future mappings */ #define MCL_ONFAULT 4/* lock all pages that are faulted in */ +#define SHADOW_STACK_SET_TOKEN (1ULL << 0)/* Set up a restore token in the shadow stack */ +#define SHADOW_STACK_SET_MARKER (1ULL << 1)/* Set up a top of stack marker in the shadow stack */ + +#endif /* __ASM_GENERIC_MMAN_H */
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 8/11 tools headers: Sync uapi/linux/fcntl.h with the kernel sources
In reply to Namhyung KimTo pick up the changes in this cset:
c374196b2b9f4b80 ("fs: name_to_handle_at() support for "explicit connectable" file handles") 95f567f81e43a1bc ("fs: Simplify getattr interface function checking AT_GETATTR_NOSEC flag")
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/perf/trace/beauty/include/uapi/linux/fcntl.h include/uapi/linux/fcntl.h
Please see tools/include/uapi/README for further details.
--- tools/perf/trace/beauty/include/uapi/linux/fcntl.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
tools/perf/trace/beauty/include/uapi/linux/fcntl.h +1 -4
@@ -153,9 +153,6 @@object identity and may not be usable with open_by_handle_at(2). */ #define AT_HANDLE_MNT_ID_UNIQUE 0x001/* Return the u64 unique mount ID. */ - -#if defined(__KERNEL__) -#define AT_GETATTR_NOSEC 0x80000000 -#endif +#define AT_HANDLE_CONNECTABLE 0x002/* Request a connectable file handle */ #endif /* _UAPI_LINUX_FCNTL_H */
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 9/11 tools headers: Sync uapi/linux/mount.h with the kernel sources
In reply to Namhyung KimTo pick up the changes in this cset:
aefff51e1c2986e1 statmount: retrieve security mount options 2f4d4503e9e5ab76 statmount: add flag to retrieve unescaped options 44010543fc8bedad fs: add the ability for statmount() to report the sb_source ed9d95f691c29748 fs: add the ability for statmount() to report the fs_subtype
This addresses these perf build warnings:
Warning: Kernel ABI header differences:
diff -u tools/perf/trace/beauty/include/uapi/linux/mount.h include/uapi/linux/mount.h
Please see tools/include/uapi/README for further details.
--- tools/perf/trace/beauty/include/uapi/linux/mount.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
tools/perf/trace/beauty/include/uapi/linux/mount.h +12 -2
@@ -154,7 +154,7 @@ struct mount_attr {*/ struct statmount {__u32 size;/* Total size, including strings */ -__u32 mnt_opts;/* [str] Mount options of the mount */ +__u32 mnt_opts;/* [str] Options (comma separated, escaped) */ __u64 mask;/* What results were written */ __u32 sb_dev_major;/* Device ID */ __u32 sb_dev_minor;
@@ -173,7 +173,13 @@ struct statmount {__u32 mnt_root;/* [str] Root of mount relative to root of fs */ __u32 mnt_point;/* [str] Mountpoint relative to current root */ __u64 mnt_ns_id;/* ID of the mount namespace */ -__u64 __spare2[49 ]; +__u32 fs_subtype;/* [str] Subtype of fs_type (if any) */ +__u32 sb_source;/* [str] Source string of the mount */ +__u32 opt_num;/* Number of fs options */ +__u32 opt_array;/* [str] Array of nul terminated fs options */ +__u32 opt_sec_num;/* Number of security options */ +__u32 opt_sec_array;/* [str] Array of nul terminated security options */ +__u64 __spare2[46 ];char str[];/* Variable size part containing strings */ };
@@ -207,6 +213,10 @@ struct mnt_id_req {#define STATMOUNT_FS_TYPE 0x00000020U/* Want/got fs_type */ #define STATMOUNT_MNT_NS_ID 0x00000040U/* Want/got mnt_ns_id */ #define STATMOUNT_MNT_OPTS 0x00000080U/* Want/got mnt_opts */ +#define STATMOUNT_FS_SUBTYPE 0x00000100U/* Want/got fs_subtype */ +#define STATMOUNT_SB_SOURCE 0x00000200U/* Want/got sb_source */ +#define STATMOUNT_OPT_ARRAY 0x00000400U/* Want/got opt_... */ +#define STATMOUNT_OPT_SEC_ARRAY 0x00000800U/* Want/got opt_sec... */ /* * Special @mnt_id values that can be passed to listmount
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 10/11 tools headers: Sync uapi/linux/prctl.h with the kernel sources
In reply to Namhyung KimTo pick up the changes in this cset:
09d6775f503b393d riscv: Add support for userspace pointer masking 91e102e79740ae43 prctl: arch-agnostic prctl for shadow stack
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.
--- .../trace/beauty/include/uapi/linux/prctl.h | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)
tools/perf/trace/beauty/include/uapi/linux/prctl.h +26 -1
@@ -230,7 +230,7 @@ struct prctl_mm_map {# define PR_PAC_APDBKEY (1UL << 3)# define PR_PAC_APGAKEY (1UL << 4) -/* Tagged user address controls for arm64 */ +/* Tagged user address controls for arm64 and RISC-V */ #define PR_SET_TAGGED_ADDR_CTRL 55#define PR_GET_TAGGED_ADDR_CTRL 56# define PR_TAGGED_ADDR_ENABLE (1UL << 0)
@@ -244,6 +244,9 @@ struct prctl_mm_map {# define PR_MTE_TAG_MASK (0xffffUL << PR_MTE_TAG_SHIFT)/* Unused; kept only for source compatibility */ # define PR_MTE_TCF_SHIFT 1 +/* RISC-V pointer masking tag length */ +# define PR_PMLEN_SHIFT 24 +# define PR_PMLEN_MASK (0x7fUL << PR_PMLEN_SHIFT)/* Control reclaim behavior when allocating memory */ #define PR_SET_IO_FLUSHER 57
@@ -328,4 +331,26 @@ struct prctl_mm_map {# define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC 0x10/* Clear the aspect on exec */ # define PR_PPC_DEXCR_CTRL_MASK 0x1f +/* +* Get the current shadow stack configuration for the current thread, +* this will be the value configured via PR_SET_SHADOW_STACK_STATUS. +*/ +#define PR_GET_SHADOW_STACK_STATUS 74 + +/* +* Set the current shadow stack configuration. Enabling the shadow +* stack will cause a shadow stack to be allocated for the thread. +*/ +#define PR_SET_SHADOW_STACK_STATUS 75 +# define PR_SHADOW_STACK_ENABLE (1UL << 0) +# define PR_SHADOW_STACK_WRITE (1UL << 1) +# define PR_SHADOW_STACK_PUSH (1UL << 2) + +/* +* Prevent further changes to the specified shadow stack +* configuration. All bits may be locked via this call, including +* undefined bits. +*/ +#define PR_LOCK_SHADOW_STACK_STATUS 76 +#endif /* _LINUX_PRCTL_H */
Signature · 1 line
2.47.0.338.g60cca15819-goog
Namhyung Kim
maintainerPATCH 11/11 perf tools: Fix build error on generated/fs_at_flags_array.c
In reply to Namhyung KimIt should only have generic flags in the array but the recent header sync brought a new flags to fcntl.h and caused a build error. Let's update the shell script to exclude flags specific to name_to_handle_at().
CC trace/beauty/fs_at_flags.o
In file included from trace/beauty/fs_at_flags.c:21:
tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: error: initialized field overwritten [-Werror=override-init]
13 | [ilog2(0x002) + 1] = "HANDLE_CONNECTABLE",
| ^~~~~~~~~~~~~~~~~~~~ tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: note: (near initialization for ‘fs_at_flags[2]’)
--- tools/perf/trace/beauty/fs_at_flags.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/trace/beauty/fs_at_flags.sh +2 -1
@@ -13,13 +13,14 @@ printf "static const char *fs_at_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+AT_([^_]+[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' # AT_EACCESS is only meaningful to faccessat, so we will special case it there... # AT_STATX_SYNC_TYPE is not a bit, its a mask of AT_STATX_SYNC_AS_STAT, AT_STATX_FORCE_SYNC and AT_STATX_DONT_SYNC -# AT_HANDLE_FID and AT_HANDLE_MNT_ID_UNIQUE are reusing values and are valid only for name_to_handle_at() +# AT_HANDLE_FID, AT_HANDLE_MNT_ID_UNIQUE and AT_HANDLE_CONNECTABLE are reusing values and are valid only for name_to_handle_at() # AT_RENAME_NOREPLACE reuses 0x1 and is valid only for renameat2() grep -E $regex ${linux_fcntl} | \ grep -v AT_EACCESS | \ grep -v AT_STATX_SYNC_TYPE | \ grep -v AT_HANDLE_FID | \ grep -v AT_HANDLE_MNT_ID_UNIQUE | \ + grep -v AT_HANDLE_CONNECTABLE | \ grep -v AT_RENAME_NOREPLACE | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
Signature · 1 line
2.47.0.338.g60cca15819-goog
James Clark
reviewerRe: [PATCH 11/11] perf tools: Fix build error on generated/fs_at_flags_array.c
Quoted 4 lines · Namhyung Kim
It should only have generic flags in the array but the recent header sync brought a new flags to
fcntl.hand caused a build error. Let's update the shell script to exclude flags specific toname_to_handle_at().
Quoted 8 lines
CC
trace/beauty/fs_at_flags.o
In file included fromtrace/beauty/fs_at_flags.c:21:
tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: error: initialized field overwritten [-Werror=override-init]13 | [ilog2(0x002) + 1] = "HANDLE_CONNECTABLE", | ^~~~~~~~~~~~~~~~~~~~
tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: note: (near initialization for ‘fs_at_flags[2]’)Signed-off-by Namhyung Kim <[email protected]>
Hi Namhyung,
Is it possible to fix this before the updates to keep it buildable? Maybe it's not feasible, I didn't check.
I did notice a build issue in the kvm tests after this update:
$ make O=../build/local/ summary=1 TARGETS=kvm kselftest
In file included from aarch64/aarch32_id_regs.c:14:include/aarch64/processor.h:15:10: fatal error: asm/brk-imm.h: No such file or directory
15 | #include <asm/brk-imm.h>
But I tried the same on v6.13-rc1 and got a different error, so I don't know if it's any worse.
Thanks
James
Quoted 24 lines
--- tools/perf/trace/beauty/fs_at_flags.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/perf/trace/beauty/fs_at_flags.sh +2
-1@@ -13,13 +13,14 @@ printf "static const char *fs_at_flags[] = {\n" regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+AT_([^_]+[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' # AT_EACCESS is only meaningful to faccessat, so we will special case it there... # AT_STATX_SYNC_TYPE is not a bit, its a mask of AT_STATX_SYNC_AS_STAT, AT_STATX_FORCE_SYNC and AT_STATX_DONT_SYNC -# AT_HANDLE_FID and AT_HANDLE_MNT_ID_UNIQUE are reusing values and are valid only for name_to_handle_at() +# AT_HANDLE_FID, AT_HANDLE_MNT_ID_UNIQUE and AT_HANDLE_CONNECTABLE are reusing values and are valid only for name_to_handle_at() # AT_RENAME_NOREPLACE reuses 0x1 and is valid only for renameat2() grep -E $regex ${linux_fcntl} | \ grep -v AT_EACCESS | \ grep -v AT_STATX_SYNC_TYPE | \ grep -v AT_HANDLE_FID | \ grep -v AT_HANDLE_MNT_ID_UNIQUE | \ + grep -v AT_HANDLE_CONNECTABLE | \ grep -v AT_RENAME_NOREPLACE | \ sed -r "s/$regex/\2 \1/g" | \ xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
Namhyung Kim
maintainerRe: [PATCH 11/11] perf tools: Fix build error on generated/fs_at_flags_array.c
Hello,
Quoted 25 lines · James Clark
Quoted 4 lines · Namhyung Kim
It should only have generic flags in the array but the recent header sync brought a new flags to
fcntl.hand caused a build error. Let's update the shell script to exclude flags specific toname_to_handle_at().Quoted 8 lines
CC
trace/beauty/fs_at_flags.o
In file included fromtrace/beauty/fs_at_flags.c:21:
tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: error: initialized field overwritten [-Werror=override-init]13 | [ilog2(0x002) + 1] = "HANDLE_CONNECTABLE", | ^~~~~~~~~~~~~~~~~~~~
tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: note: (near initialization for ‘fs_at_flags[2]’)Signed-off-by Namhyung Kim <[email protected]>Hi Namhyung,
Is it possible to fix this before the updates to keep it buildable? Maybe it's not feasible, I didn't check.
I did notice a build issue in the kvm tests after this update:
$ make O=../build/local/ summary=1 TARGETS=kvm kselftest
Quoted 7 lines
In file included from
aarch64/aarch32_id_regs.c:14:include/aarch64/processor.h:15:10: fatal error:asm/brk-imm.h: No such file or directory
15 | #include <asm/brk-imm.h>But I tried the same on v6.13-rc1 and got a different error, so I don't know if it's any worse.
I suspect it's an unrelated issue. This fix is about generating descriptions of the flags for perf trace beautifier.
The below is the only change I made in this series for arm64.
Thanks,
Namhyung
---8<---
tools/arch/arm64/include/uapi/asm/kvm.h +6 -0
@@ -484,6 +484,12 @@ enum {*/ #define KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 (1ULL << 0) +/* +* Shutdown caused by a PSCI v1.3 SYSTEM_OFF2 call. +* Valid only when the system event has a type of KVM_SYSTEM_EVENT_SHUTDOWN. +*/ +#define KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2 (1ULL << 0) +/* run->fail_entry.hardware_entry_failure_reason codes. */ #define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED (1ULL << 0)
James Clark
reviewerRe: [PATCH 11/11] perf tools: Fix build error on generated/fs_at_flags_array.c
Quoted 36 lines · Namhyung Kim
Hello,
Quoted 25 lines · James Clark
Quoted 4 lines · Namhyung Kim
It should only have generic flags in the array but the recent header sync brought a new flags to
fcntl.hand caused a build error. Let's update the shell script to exclude flags specific toname_to_handle_at().Quoted 8 lines
CC
trace/beauty/fs_at_flags.o
In file included fromtrace/beauty/fs_at_flags.c:21:
tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: error: initialized field overwritten [-Werror=override-init]
13 | [ilog2(0x002) + 1] = "HANDLE_CONNECTABLE",
| ^~~~~~~~~~~~~~~~~~~~
tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: note: (near initialization for ‘fs_at_flags[2]’)Signed-off-by Namhyung Kim <[email protected]>Hi Namhyung,
Is it possible to fix this before the updates to keep it buildable? Maybe it's not feasible, I didn't check.
I did notice a build issue in the kvm tests after this update:
$ make O=../build/local/ summary=1 TARGETS=kvm kselftestQuoted 7 lines
In file included from
aarch64/aarch32_id_regs.c:14:include/aarch64/processor.h:15:10: fatal error:asm/brk-imm.h: No such file or directory15 | #include <asm/brk-imm.h>But I tried the same on v6.13-rc1 and got a different error, so I don't know if it's any worse.
Quoted 8 lines
I suspect it's an unrelated issue. This fix is about generating descriptions of the flags for perf trace beautifier.
The below is the only change I made in this series for arm64.
Thanks,
Namhyung
I'll take a look
Quoted 18 lines
---8<---
tools/arch/arm64/include/uapi/asm/kvm.h +6
-0@@ -484,6 +484,12 @@ enum {*/ #define KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 (1ULL << 0) +/* +* Shutdown caused by a PSCI v1.3 SYSTEM_OFF2 call. +* Valid only when the system event has a type of KVM_SYSTEM_EVENT_SHUTDOWN. +*/ +#define KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2 (1ULL << 0) +/* run->fail_entry.hardware_entry_failure_reason codes. */ #define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED (1ULL << 0)
James Clark
reviewerRe: [PATCH 11/11] perf tools: Fix build error on generated/fs_at_flags_array.c
Quoted 42 lines · James Clark
Quoted 39 lines · Namhyung Kim
Hello,
Quoted 25 lines · James Clark
Quoted 4 lines · Namhyung Kim
It should only have generic flags in the array but the recent header sync brought a new flags to
fcntl.hand caused a build error. Let's update the shell script to exclude flags specific toname_to_handle_at().Quoted 8 lines
CC
trace/beauty/fs_at_flags.o
In file included fromtrace/beauty/fs_at_flags.c:21:
tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: error: initialized field overwritten [-Werror=override-init] 13 | [ilog2(0x002) + 1] = "HANDLE_CONNECTABLE",
| ^~~~~~~~~~~~~~~~~~~~tools/perf/trace/beauty/generated/fs_at_flags_array.c:13:30: note: (near initialization for ‘fs_at_flags[2]’)Signed-off-by Namhyung Kim <[email protected]>Hi Namhyung,
Is it possible to fix this before the updates to keep it buildable? Maybe it's not feasible, I didn't check.
I did notice a build issue in the kvm tests after this update:
$ make O=../build/local/ summary=1 TARGETS=kvm kselftestQuoted 7 lines
In file included from
aarch64/aarch32_id_regs.c:14:include/aarch64/processor.h:15:10: fatal error:asm/brk-imm.h: No such file or directory
15 | #include <asm/brk-imm.h>But I tried the same on v6.13-rc1 and got a different error, so I don't know if it's any worse.
I suspect it's an unrelated issue. This fix is about generating descriptions of the flags for perf trace beautifier.
Quoted 8 lines
Quoted 5 lines
The below is the only change I made in this series for arm64.
Thanks,
NamhyungI'll take a look
Looked like some kind of stale build issue. A clean fixed it but I wasn't able to reproduce it.
Quoted 19 lines
Quoted 18 lines
---8<---
tools/arch/arm64/include/uapi/asm/kvm.h +3
-0@@ -484,6 +484,12 @@ enum {*/ #define KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 (1ULL << 0) +/* +* Shutdown caused by a PSCI v1.3 SYSTEM_OFF2 call. +* Valid only when the system event has a type of
KVM_SYSTEM_EVENT_SHUTDOWN.
+ */tools/arch/arm64/include/uapi/asm/kvm.h +2
-0+#define KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2 (1ULL << 0) +/*
run->fail_entry.hardware_entry_failure_reasoncodes. */ #define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED (1ULL << 0)
Quoted 10 lines · Namhyung Kim
Hello,
I'll carry these changes on the perf tools tree to update perf tools to understand new syscalls and parameters. You can refer to README file in the
tools/include/uapidirectory why it's needed.Thanks,
Namhyung
Quoted 32 lines
Namhyung Kim (11):
tools headers: Syncuapi/drm/drm.hwith the kernel sources tools headers: Syncuapi/linux/perf_event.hwith the kernel sources tools headers: Syncuapi/linux/kvm.hwith the kernel sources tools headers: Sync x86 kvm and cpufeature headers with the kernel tools headers: Sync arm64 kvm header with the kernel sources tools headers: Sync *xattrat syscall changes with the kernel sources tools headers: Syncuapi/asm-generic/mman.hwith the kernel sources tools headers: Syncuapi/linux/fcntl.hwith the kernel sources tools headers: Syncuapi/linux/mount.hwith the kernel sources tools headers: Syncuapi/linux/prctl.hwith the kernel sources perf tools: Fix build error ongenerated/fs_at_flags_array.ctools/arch/arm64/include/uapi/asm/kvm.h | 6 +++++ tools/arch/x86/include/asm/cpufeatures.h | 11 ++++++-- tools/arch/x86/include/uapi/asm/kvm.h | 1 + tools/include/uapi/asm-generic/mman.h | 4 +++ tools/include/uapi/asm-generic/unistd.h | 11 +++++++- tools/include/uapi/drm/drm.h | 17 ++++++++++++ tools/include/uapi/linux/kvm.h | 8 ++++++ tools/include/uapi/linux/perf_event.h | 11 +++++++- .../arch/mips/entry/syscalls/syscall_n64.tbl | 4 +++ .../arch/powerpc/entry/syscalls/syscall.tbl | 4 +++ .../perf/arch/s390/entry/syscalls/syscall.tbl | 4 +++ .../arch/x86/entry/syscalls/syscall_32.tbl | 4 +++ .../arch/x86/entry/syscalls/syscall_64.tbl | 4 +++ tools/perf/trace/beauty/fs_at_flags.sh | 3 ++- .../trace/beauty/include/uapi/linux/fcntl.h | 5 +--- .../trace/beauty/include/uapi/linux/mount.h | 14 ++++++++-- .../trace/beauty/include/uapi/linux/prctl.h | 27 ++++++++++++++++++- 17 files changed, 126 insertions(+), 12 deletions(-)
Quoted 8 lines · Namhyung Kim
I'll carry these changes on the perf tools tree to update perf tools to understand new syscalls and parameters. You can refer to README file in the
tools/include/uapidirectory why it's needed.Thanks,
Namhyung[...]
Applied to perf-tools, thanks!
Best regards,
Namhyung