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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

Pull perf tools fixes from Arnaldo Carvalho de Melo:

- Update copies of kernel headers, which resulted in support for the
new 'mseal' syscall, SUBVOL statx return mask bit, RISC-V and PPC
prctls, fcntl's DUPFD_QUERY, POSTED_MSI_NOTIFICATION IRQ vector,
'map_shadow_stack' syscall for x86-32.

- Revert perf.data record memory allocation optimization that ended up
causing a regression, work is being done to re-introduce it in the
next merge window.

- Fix handling of minimal vmlinux.h file used with BPF's CO-RE when
interrupting the build.

* tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
perf bpf: Fix handling of minimal vmlinux.h file when interrupting the build
Revert "perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event"
tools headers arm64: Sync arm64's cputype.h with the kernel sources
tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_SUBVOL
tools headers UAPI: Update i915_drm.h with the kernel sources
tools headers UAPI: Sync kvm headers with the kernel sources
tools arch x86: Sync the msr-index.h copy with the kernel sources
tools headers: Update the syscall tables and unistd.h, mostly to support the new 'mseal' syscall
perf trace beauty: Update the arch/x86/include/asm/irq_vectors.h copy with the kernel sources to pick POSTED_MSI_NOTIFICATION
perf beauty: Update copy of linux/socket.h with the kernel sources
tools headers UAPI: Sync fcntl.h with the kernel sources to pick F_DUPFD_QUERY
tools headers UAPI: Sync linux/prctl.h with the kernel sources
tools include UAPI: Sync linux/stat.h with the kernel sources

+118 -29
+6
tools/arch/arm64/include/asm/cputype.h
··· 86 86 #define ARM_CPU_PART_CORTEX_X2 0xD48 87 87 #define ARM_CPU_PART_NEOVERSE_N2 0xD49 88 88 #define ARM_CPU_PART_CORTEX_A78C 0xD4B 89 + #define ARM_CPU_PART_NEOVERSE_V2 0xD4F 90 + #define ARM_CPU_PART_CORTEX_X4 0xD82 91 + #define ARM_CPU_PART_NEOVERSE_V3 0xD84 89 92 90 93 #define APM_CPU_PART_XGENE 0x000 91 94 #define APM_CPU_VAR_POTENZA 0x00 ··· 162 159 #define MIDR_CORTEX_X2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X2) 163 160 #define MIDR_NEOVERSE_N2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N2) 164 161 #define MIDR_CORTEX_A78C MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78C) 162 + #define MIDR_NEOVERSE_V2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V2) 163 + #define MIDR_CORTEX_X4 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X4) 164 + #define MIDR_NEOVERSE_V3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V3) 165 165 #define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX) 166 166 #define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX) 167 167 #define MIDR_THUNDERX_83XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_83XX)
+4 -5
tools/arch/x86/include/asm/msr-index.h
··· 170 170 * CPU is not affected by Branch 171 171 * History Injection. 172 172 */ 173 + #define ARCH_CAP_XAPIC_DISABLE BIT(21) /* 174 + * IA32_XAPIC_DISABLE_STATUS MSR 175 + * supported 176 + */ 173 177 #define ARCH_CAP_PBRSB_NO BIT(24) /* 174 178 * Not susceptible to Post-Barrier 175 179 * Return Stack Buffer Predictions. ··· 194 190 #define ARCH_CAP_RFDS_CLEAR BIT(28) /* 195 191 * VERW clears CPU Register 196 192 * File. 197 - */ 198 - 199 - #define ARCH_CAP_XAPIC_DISABLE BIT(21) /* 200 - * IA32_XAPIC_DISABLE_STATUS MSR 201 - * supported 202 193 */ 203 194 204 195 #define MSR_IA32_FLUSH_CMD 0x0000010b
+20 -2
tools/arch/x86/include/uapi/asm/kvm.h
··· 457 457 458 458 #define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001 459 459 460 - /* attributes for system fd (group 0) */ 461 - #define KVM_X86_XCOMP_GUEST_SUPP 0 460 + /* vendor-independent attributes for system fd (group 0) */ 461 + #define KVM_X86_GRP_SYSTEM 0 462 + # define KVM_X86_XCOMP_GUEST_SUPP 0 463 + 464 + /* vendor-specific groups and attributes for system fd */ 465 + #define KVM_X86_GRP_SEV 1 466 + # define KVM_X86_SEV_VMSA_FEATURES 0 462 467 463 468 struct kvm_vmx_nested_state_data { 464 469 __u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE]; ··· 694 689 /* Guest Migration Extension */ 695 690 KVM_SEV_SEND_CANCEL, 696 691 692 + /* Second time is the charm; improved versions of the above ioctls. */ 693 + KVM_SEV_INIT2, 694 + 697 695 KVM_SEV_NR_MAX, 698 696 }; 699 697 ··· 706 698 __u64 data; 707 699 __u32 error; 708 700 __u32 sev_fd; 701 + }; 702 + 703 + struct kvm_sev_init { 704 + __u64 vmsa_features; 705 + __u32 flags; 706 + __u16 ghcb_version; 707 + __u16 pad1; 708 + __u32 pad2[8]; 709 709 }; 710 710 711 711 struct kvm_sev_launch_start { ··· 872 856 873 857 #define KVM_X86_DEFAULT_VM 0 874 858 #define KVM_X86_SW_PROTECTED_VM 1 859 + #define KVM_X86_SEV_VM 2 860 + #define KVM_X86_SEV_ES_VM 3 875 861 876 862 #endif /* _ASM_X86_KVM_H */
+4 -1
tools/include/uapi/asm-generic/unistd.h
··· 842 842 #define __NR_lsm_list_modules 461 843 843 __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules) 844 844 845 + #define __NR_mseal 462 846 + __SYSCALL(__NR_mseal, sys_mseal) 847 + 845 848 #undef __NR_syscalls 846 - #define __NR_syscalls 462 849 + #define __NR_syscalls 463 847 850 848 851 /* 849 852 * 32 bit systems traditionally used different
+28 -3
tools/include/uapi/drm/i915_drm.h
··· 806 806 */ 807 807 #define I915_PARAM_PXP_STATUS 58 808 808 809 + /* 810 + * Query if kernel allows marking a context to send a Freq hint to SLPC. This 811 + * will enable use of the strategies allowed by the SLPC algorithm. 812 + */ 813 + #define I915_PARAM_HAS_CONTEXT_FREQ_HINT 59 814 + 809 815 /* Must be kept compact -- no holes and well documented */ 810 816 811 817 /** ··· 2154 2148 * -EIO: The firmware did not succeed in creating the protected context. 2155 2149 */ 2156 2150 #define I915_CONTEXT_PARAM_PROTECTED_CONTENT 0xd 2151 + 2152 + /* 2153 + * I915_CONTEXT_PARAM_LOW_LATENCY: 2154 + * 2155 + * Mark this context as a low latency workload which requires aggressive GT 2156 + * frequency scaling. Use I915_PARAM_HAS_CONTEXT_FREQ_HINT to check if the kernel 2157 + * supports this per context flag. 2158 + */ 2159 + #define I915_CONTEXT_PARAM_LOW_LATENCY 0xe 2157 2160 /* Must be kept compact -- no holes and well documented */ 2158 2161 2159 2162 /** @value: Context parameter value to be set or queried */ ··· 2638 2623 * 2639 2624 */ 2640 2625 2626 + /* 2627 + * struct drm_i915_reset_stats - Return global reset and other context stats 2628 + * 2629 + * Driver keeps few stats for each contexts and also global reset count. 2630 + * This struct can be used to query those stats. 2631 + */ 2641 2632 struct drm_i915_reset_stats { 2633 + /** @ctx_id: ID of the requested context */ 2642 2634 __u32 ctx_id; 2635 + 2636 + /** @flags: MBZ */ 2643 2637 __u32 flags; 2644 2638 2645 - /* All resets since boot/module reload, for all contexts */ 2639 + /** @reset_count: All resets since boot/module reload, for all contexts */ 2646 2640 __u32 reset_count; 2647 2641 2648 - /* Number of batches lost when active in GPU, for this context */ 2642 + /** @batch_active: Number of batches lost when active in GPU, for this context */ 2649 2643 __u32 batch_active; 2650 2644 2651 - /* Number of batches lost pending for execution, for this context */ 2645 + /** @batch_pending: Number of batches lost pending for execution, for this context */ 2652 2646 __u32 batch_pending; 2653 2647 2648 + /** @pad: MBZ */ 2654 2649 __u32 pad; 2655 2650 }; 2656 2651
+2 -2
tools/include/uapi/linux/kvm.h
··· 1221 1221 /* Available with KVM_CAP_SPAPR_RESIZE_HPT */ 1222 1222 #define KVM_PPC_RESIZE_HPT_PREPARE _IOR(KVMIO, 0xad, struct kvm_ppc_resize_hpt) 1223 1223 #define KVM_PPC_RESIZE_HPT_COMMIT _IOR(KVMIO, 0xae, struct kvm_ppc_resize_hpt) 1224 - /* Available with KVM_CAP_PPC_RADIX_MMU or KVM_CAP_PPC_MMU_HASH_V3 */ 1224 + /* Available with KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3 */ 1225 1225 #define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_cfg) 1226 - /* Available with KVM_CAP_PPC_RADIX_MMU */ 1226 + /* Available with KVM_CAP_PPC_MMU_RADIX */ 1227 1227 #define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info) 1228 1228 /* Available with KVM_CAP_PPC_GET_CPU_CHAR */ 1229 1229 #define KVM_PPC_GET_CPU_CHAR _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char)
+3 -1
tools/include/uapi/linux/stat.h
··· 126 126 __u64 stx_mnt_id; 127 127 __u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */ 128 128 __u32 stx_dio_offset_align; /* File offset alignment for direct I/O */ 129 + __u64 stx_subvol; /* Subvolume identifier */ 129 130 /* 0xa0 */ 130 - __u64 __spare3[12]; /* Spare space for future expansion */ 131 + __u64 __spare3[11]; /* Spare space for future expansion */ 131 132 /* 0x100 */ 132 133 }; 133 134 ··· 156 155 #define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */ 157 156 #define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */ 158 157 #define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */ 158 + #define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */ 159 159 160 160 #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */ 161 161
+1
tools/perf/Makefile.perf
··· 214 214 215 215 ifdef MAKECMDGOALS 216 216 ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),) 217 + VMLINUX_H=$(src-perf)/util/bpf_skel/vmlinux/vmlinux.h 217 218 config := 0 218 219 endif 219 220 endif
+1
tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl
··· 376 376 459 n64 lsm_get_self_attr sys_lsm_get_self_attr 377 377 460 n64 lsm_set_self_attr sys_lsm_set_self_attr 378 378 461 n64 lsm_list_modules sys_lsm_list_modules 379 + 462 n64 mseal sys_mseal
+1
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl
··· 548 548 459 common lsm_get_self_attr sys_lsm_get_self_attr 549 549 460 common lsm_set_self_attr sys_lsm_set_self_attr 550 550 461 common lsm_list_modules sys_lsm_list_modules 551 + 462 common mseal sys_mseal
+1
tools/perf/arch/s390/entry/syscalls/syscall.tbl
··· 464 464 459 common lsm_get_self_attr sys_lsm_get_self_attr sys_lsm_get_self_attr 465 465 460 common lsm_set_self_attr sys_lsm_set_self_attr sys_lsm_set_self_attr 466 466 461 common lsm_list_modules sys_lsm_list_modules sys_lsm_list_modules 467 + 462 common mseal sys_mseal sys_mseal
+2 -1
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
··· 374 374 450 common set_mempolicy_home_node sys_set_mempolicy_home_node 375 375 451 common cachestat sys_cachestat 376 376 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 378 378 454 common futex_wake sys_futex_wake 379 379 455 common futex_wait sys_futex_wait 380 380 456 common futex_requeue sys_futex_requeue ··· 383 383 459 common lsm_get_self_attr sys_lsm_get_self_attr 384 384 460 common lsm_set_self_attr sys_lsm_set_self_attr 385 385 461 common lsm_list_modules sys_lsm_list_modules 386 + 462 common mseal sys_mseal 386 387 387 388 # 388 389 # Due to a historical design error, certain syscalls are numbered differently
+2 -4
tools/perf/builtin-record.c
··· 1956 1956 1957 1957 if (count.lost) { 1958 1958 if (!lost) { 1959 - lost = zalloc(sizeof(*lost) + 1960 - session->machines.host.id_hdr_size); 1959 + lost = zalloc(PERF_SAMPLE_MAX_SIZE); 1961 1960 if (!lost) { 1962 1961 pr_debug("Memory allocation failed\n"); 1963 1962 return; ··· 1972 1973 lost_count = perf_bpf_filter__lost_count(evsel); 1973 1974 if (lost_count) { 1974 1975 if (!lost) { 1975 - lost = zalloc(sizeof(*lost) + 1976 - session->machines.host.id_hdr_size); 1976 + lost = zalloc(PERF_SAMPLE_MAX_SIZE); 1977 1977 if (!lost) { 1978 1978 pr_debug("Memory allocation failed\n"); 1979 1979 return;
+1 -1
tools/perf/builtin-trace.c
··· 765 765 static DEFINE_STRARRAY(fcntl_cmds, "F_"); 766 766 767 767 static const char *fcntl_linux_specific_cmds[] = { 768 - "SETLEASE", "GETLEASE", "NOTIFY", [5] = "CANCELLK", "DUPFD_CLOEXEC", 768 + "SETLEASE", "GETLEASE", "NOTIFY", "DUPFD_QUERY", [5] = "CANCELLK", "DUPFD_CLOEXEC", 769 769 "SETPIPE_SZ", "GETPIPE_SZ", "ADD_SEALS", "GET_SEALS", 770 770 "GET_RW_HINT", "SET_RW_HINT", "GET_FILE_RW_HINT", "SET_FILE_RW_HINT", 771 771 };
+7 -1
tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h
··· 97 97 98 98 #define LOCAL_TIMER_VECTOR 0xec 99 99 100 + /* 101 + * Posted interrupt notification vector for all device MSIs delivered to 102 + * the host kernel. 103 + */ 104 + #define POSTED_MSI_NOTIFICATION_VECTOR 0xeb 105 + 100 106 #define NR_VECTORS 256 101 107 102 108 #ifdef CONFIG_X86_LOCAL_APIC 103 - #define FIRST_SYSTEM_VECTOR LOCAL_TIMER_VECTOR 109 + #define FIRST_SYSTEM_VECTOR POSTED_MSI_NOTIFICATION_VECTOR 104 110 #else 105 111 #define FIRST_SYSTEM_VECTOR NR_VECTORS 106 112 #endif
+2 -1
tools/perf/trace/beauty/include/linux/socket.h
··· 16 16 struct socket; 17 17 struct sock; 18 18 struct sk_buff; 19 + struct proto_accept_arg; 19 20 20 21 #define __sockaddr_check_size(size) \ 21 22 BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) ··· 434 433 extern int __sys_sendto(int fd, void __user *buff, size_t len, 435 434 unsigned int flags, struct sockaddr __user *addr, 436 435 int addr_len); 437 - extern struct file *do_accept(struct file *file, unsigned file_flags, 436 + extern struct file *do_accept(struct file *file, struct proto_accept_arg *arg, 438 437 struct sockaddr __user *upeer_sockaddr, 439 438 int __user *upeer_addrlen, int flags); 440 439 extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
+8 -6
tools/perf/trace/beauty/include/uapi/linux/fcntl.h
··· 9 9 #define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1) 10 10 11 11 /* 12 + * Request nofications on a directory. 13 + * See below for events that may be notified. 14 + */ 15 + #define F_NOTIFY (F_LINUX_SPECIFIC_BASE + 2) 16 + 17 + #define F_DUPFD_QUERY (F_LINUX_SPECIFIC_BASE + 3) 18 + 19 + /* 12 20 * Cancel a blocking posix lock; internal use only until we expose an 13 21 * asynchronous lock api to userspace: 14 22 */ ··· 24 16 25 17 /* Create a file descriptor with FD_CLOEXEC set. */ 26 18 #define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6) 27 - 28 - /* 29 - * Request nofications on a directory. 30 - * See below for events that may be notified. 31 - */ 32 - #define F_NOTIFY (F_LINUX_SPECIFIC_BASE+2) 33 19 34 20 /* 35 21 * Set and get of pipe page size array
+22
tools/perf/trace/beauty/include/uapi/linux/prctl.h
··· 306 306 # define PR_RISCV_V_VSTATE_CTRL_NEXT_MASK 0xc 307 307 # define PR_RISCV_V_VSTATE_CTRL_MASK 0x1f 308 308 309 + #define PR_RISCV_SET_ICACHE_FLUSH_CTX 71 310 + # define PR_RISCV_CTX_SW_FENCEI_ON 0 311 + # define PR_RISCV_CTX_SW_FENCEI_OFF 1 312 + # define PR_RISCV_SCOPE_PER_PROCESS 0 313 + # define PR_RISCV_SCOPE_PER_THREAD 1 314 + 315 + /* PowerPC Dynamic Execution Control Register (DEXCR) controls */ 316 + #define PR_PPC_GET_DEXCR 72 317 + #define PR_PPC_SET_DEXCR 73 318 + /* DEXCR aspect to act on */ 319 + # define PR_PPC_DEXCR_SBHE 0 /* Speculative branch hint enable */ 320 + # define PR_PPC_DEXCR_IBRTPD 1 /* Indirect branch recurrent target prediction disable */ 321 + # define PR_PPC_DEXCR_SRAPD 2 /* Subroutine return address prediction disable */ 322 + # define PR_PPC_DEXCR_NPHIE 3 /* Non-privileged hash instruction enable */ 323 + /* Action to apply / return */ 324 + # define PR_PPC_DEXCR_CTRL_EDITABLE 0x1 /* Aspect can be modified with PR_PPC_SET_DEXCR */ 325 + # define PR_PPC_DEXCR_CTRL_SET 0x2 /* Set the aspect for this process */ 326 + # define PR_PPC_DEXCR_CTRL_CLEAR 0x4 /* Clear the aspect for this process */ 327 + # define PR_PPC_DEXCR_CTRL_SET_ONEXEC 0x8 /* Set the aspect on exec */ 328 + # define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC 0x10 /* Clear the aspect on exec */ 329 + # define PR_PPC_DEXCR_CTRL_MASK 0x1f 330 + 309 331 #endif /* _LINUX_PRCTL_H */
+3 -1
tools/perf/trace/beauty/include/uapi/linux/stat.h
··· 126 126 __u64 stx_mnt_id; 127 127 __u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */ 128 128 __u32 stx_dio_offset_align; /* File offset alignment for direct I/O */ 129 + __u64 stx_subvol; /* Subvolume identifier */ 129 130 /* 0xa0 */ 130 - __u64 __spare3[12]; /* Spare space for future expansion */ 131 + __u64 __spare3[11]; /* Spare space for future expansion */ 131 132 /* 0x100 */ 132 133 }; 133 134 ··· 156 155 #define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */ 157 156 #define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */ 158 157 #define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */ 158 + #define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */ 159 159 160 160 #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */ 161 161