Skip to contentSkip to conversation

perf tools: Add a script to sync the header copies with the kernel sources

PATCH Superseded Arnaldo Carvalho de Melo 2 participants 11 messages Oct 21 perf events

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Arnaldo Carvalho de Melo

author maintainer
#0 lore raw

cover perf tools: Add a script to sync the header copies with the kernel sources

Hi,

The tools/ tree carries copies of kernel headers that are refreshed by
hand: check-headers points at the stale ones, then one looks up the kernel commits that changed each of them, pastes the relevant bits into the commit message, regenerates the beauty string tables, builds the consumers and commits, one header at a time.

This adds tools/perf/scripts/sync-headers.sh, also available as 'make -C tools/perf sync-headers', and patches 2-12 are what it produced for this
branch: for each stale header it finds the kernel commits since the last sync, copies the file, runs the beauty scripts before and after for the beauty copies, builds perf and the other consumers of the header and creates a commit in the usual format, grouping the headers that share a consumer, as with the KVM ones.

As for the state of the copies, only two headers are newer in this branch than in the kernel sources, perf_event.h and perf_regs.h: changes to them this time went to tools/ first, with the kernel picking them up later, so the script checks if the kernel file matches an earlier tools/ state and leaves those alone.

Best regards,

- Arnaldo

Arnaldo Carvalho de Melo (12):
perf tools: Add script and make target to sync the header copies with
the kernel
tools headers UAPI: Sync linux/if_addr.h with the kernel sources tools headers UAPI: Sync linux/rtnetlink.h with the kernel sources tools headers: Sync linux/gfp_types.h with the kernel sources tools headers x86 cpufeatures: Sync with the kernel sources tools arch x86: Sync the msr-index.h copy with the kernel sources perf beauty: Update copy of linux/socket.h with the kernel sources tools headers: Sync UAPI linux/fcntl.h with the kernel sources tools headers: Sync UAPI linux/fs.h with the kernel sources tools headers: Sync UAPI linux/mount.h with the kernel sources tools headers: Sync UAPI sound/asound.h with kernel sources tools headers: Sync KVM headers with the kernel sources

 tools/arch/arm64/include/uapi/asm/kvm.h       |    1 +
 tools/arch/powerpc/include/uapi/asm/kvm.h     |   18 +
 tools/arch/x86/include/asm/cpufeatures.h      |   15 +
 tools/arch/x86/include/asm/msr-index.h        |    9 +-
 tools/include/linux/gfp_types.h               |    5 +-
 tools/include/uapi/linux/if_addr.h            |    1 +
 tools/include/uapi/linux/kvm.h                |    4 +
 tools/include/uapi/linux/rtnetlink.h          |   25 +
 tools/perf/Makefile                           |    5 +-
 tools/perf/Makefile.perf                      |    3 +
 tools/perf/scripts/sync-headers.sh            | 1256 +++++++++++++++++
 .../perf/trace/beauty/include/linux/socket.h  |   11 +-
 .../trace/beauty/include/uapi/linux/fcntl.h   |    1 +
 .../perf/trace/beauty/include/uapi/linux/fs.h |    1 +
 .../trace/beauty/include/uapi/linux/mount.h   |    1 +
 .../trace/beauty/include/uapi/sound/asound.h  |  200 +--
 16 files changed, 1452 insertions(+), 104 deletions(-)
 create mode 100755 tools/perf/scripts/sync-headers.sh

base-commit: 9b435ebe2ddd69af06e6d0bbe52c590179b1ff9f

author maintainer
#1 lore raw

PATCH 1/12 perf tools: Add script and make target to sync the header copies with the kernel

From: Arnaldo Carvalho de Melo <[email protected]>

This is to be used by the perf maintainers to sync the header copies with the kernel originals, see the description below for how it works.

  $ tools/perf/scripts/sync-headers.sh --help
  Usage: sync-headers.sh [OPTIONS]

Sync tools/ header copies with the kernel sources and create commits.

Options:

    -n, --dry-run       Show what would be done without making changes
    -N, --no-build      Skip the perf build verification step
    -C, --no-commit     Copy files but do not create git commits
    -f, --filter PAT    Only process headers matching PAT (substring match

against the kernel-side path)
-o, --output DIR Build output directory (default: /tmp/build/perf-tools-1000)
-v, --verbose Show more details
-h, --help Show this help

Environment:

    SIGN_OFF_NAME       Override git user.name for Signed-off-by
    SIGN_OFF_EMAIL      Override git user.email for Signed-off-by
    OUTPUT_DIR          Build output directory

Through make:
SYNC_HEADERS_ARGS Options to pass to this script, e.g.:
make -C tools/perf sync-headers SYNC_HEADERS_ARGS='-n'

The script:
1. Runs 'make -C tools/perf check-headers' to find stale copies.
2. For each stale header, identifies the kernel commits that changed it.
3. Copies the kernel header into the tools/ tree.
4. For beauty headers, runs the relevant beauty script(s) before and after, showing new/changed string table entries.
5. Builds perf and the other consumers of the header to verify nothing breaks.
6. Creates a git commit per header (or group) with the standard commit message format.

$

It is also available as:

  $ make -C tools/perf sync-headers
  ==> Running check-headers to detect stale copies...

Stale headers found:
tools/include/uapi/linux/if_addr.h include/uapi/linux/if_addr.h tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h
...
tools/perf/trace/beauty/include/uapi/sound/asound.h include/uapi/sound/asound.h

==> Processing: include/uapi/linux/if_addr.h

Kernel commits since last sync:
7cb8198761e6 ("net: ipv4: report multicast group user count")
==> Copied include/uapi/linux/if_addr.h -> tools/include/uapi/linux/if_addr.h ==> Build-testing consumers of if_addr.h:
perf (tools/perf)
==> Build OK.
==> Committed: tools headers UAPI: Sync linux/if_addr.h with the kernel sources

==> Processing: include/uapi/linux/perf_event.h
Warning: tools/include/uapi/linux/perf_event.h matches a previous tools/ state, leaving it alone

==> Processing: include/uapi/linux/rtnetlink.h

Kernel commits since last sync:
cc17e386f8a5 ("ipv6: add ip6_del_rt_reason()")
==> Copied include/uapi/linux/rtnetlink.h -> tools/include/uapi/linux/rtnetlink.h ==> Build-testing consumers of rtnetlink.h:
libbpf (tools/lib/bpf)
bpftool (tools/bpf/bpftool)
perf (tools/perf)
==> Build OK.
==> Committed: tools headers UAPI: Sync linux/rtnetlink.h with the kernel sources
...
==> Processing: include/linux/socket.h

Kernel commits since last sync:
be3a5e06b962 ("net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD") 5bd369c05576 ("net: Add connect_socket() helper")
==> Copied include/linux/socket.h -> tools/perf/trace/beauty/include/linux/socket.h ==> Build-testing consumers of socket.h:
perf (tools/perf)
==> Build OK.
==> Committed: perf beauty: Update copy of linux/socket.h with the kernel sources
...

==> Processing group: KVM headers (3 files)
...
==> Build-testing consumers of group KVM headers:
perf (tools/perf)
==> Build OK.
...

=========================================
Summary
=========================================
==> Synced successfully (13):
tools/include/uapi/linux/if_addr.h tools/include/uapi/linux/rtnetlink.h tools/include/linux/gfp_types.h tools/arch/x86/include/asm/cpufeatures.h tools/arch/x86/include/asm/msr-index.h tools/perf/trace/beauty/include/linux/socket.h tools/perf/trace/beauty/include/uapi/linux/fcntl.h tools/perf/trace/beauty/include/uapi/linux/fs.h tools/perf/trace/beauty/include/uapi/linux/mount.h tools/perf/trace/beauty/include/uapi/sound/asound.h tools/include/uapi/linux/kvm.h tools/arch/powerpc/include/uapi/asm/kvm.h tools/arch/arm64/include/uapi/asm/kvm.h

Warning: Headers still out of sync:
tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h tools/arch/x86/include/uapi/asm/perf_regs.h arch/x86/include/uapi/asm/perf_regs.h

Cc Adrian Hunter <[email protected]>
Cc Ian Rogers <[email protected]>
Cc James Clark <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Assisted-by LLM
---
 tools/perf/Makefile                |    5 +-
 tools/perf/Makefile.perf           |    3 +
 tools/perf/scripts/sync-headers.sh | 1256 ++++++++++++++++++++++++++++
 3 files changed, 1263 insertions(+), 1 deletion(-)
 create mode 100755 tools/perf/scripts/sync-headers.sh
tools/perf/Makefile +4 -1
index c1818bd5f2879ac9..00baf90e5bda7123 100644
@@ -137,6 +137,9 @@ build-test-tarball:
 check-headers:
 	@./check-headers.sh
 
+sync-headers:
+	@./scripts/sync-headers.sh $(SYNC_HEADERS_ARGS)
+
 #
 # All other targets get passed through:
 #
@@ -144,4 +147,4 @@ check-headers:
 	$(print_msg)
 	$(make)
 
-.PHONY: all clean tags TAGS FORCE Makefile build-test build-test-tarball check-headers
+.PHONY: all clean tags TAGS FORCE Makefile build-test build-test-tarball check-headers sync-headers
tools/perf/Makefile.perf +3 -0
index 2d9379fea2672755..b74b534e1153ffcb 100644
@@ -870,6 +870,9 @@ help:
 	@echo ''
 	@echo 'Perf maintainer targets:'
 	@echo '  clean			- clean all binary objects and build output'
+	@echo '  check-headers		- check which header copies are out of sync with the kernel'
+	@echo '  sync-headers		- sync those header copies with the kernel, creating commits'
+	@echo '			  (SYNC_HEADERS_ARGS="..." passes options to the script)'
 
 
 DOC_TARGETS := doc man html info pdf
tools/perf/scripts/sync-headers.sh new file +1256 -0

1,256 lines not on this page · raw message

Signature · 1 line
2.56.0
author maintainer
#2 lore raw

PATCH 2/12 tools headers UAPI: Sync linux/if_addr.h with the kernel sources

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

To pick up the changes in:

7cb8198761e6 ("net: ipv4: report multicast group user count")

That just rebuilds perf, silencing this build warning.

This addresses this perf build warning:

Warning: Kernel ABI header differences:
diff -u tools/include/uapi/linux/if_addr.h include/uapi/linux/if_addr.h

Please see tools/include/uapi/README for further details.

---
 tools/include/uapi/linux/if_addr.h | 1 +
 1 file changed, 1 insertion(+)
tools/include/uapi/linux/if_addr.h +1 -0
index aa7958b4e41d044b..7fb630b7fe311ab4 100644
@@ -36,6 +36,7 @@ enum {
 	IFA_RT_PRIORITY,	/* u32, priority/metric for prefix route */
 	IFA_TARGET_NETNSID,
 	IFA_PROTO,		/* u8, address protocol */
+	IFA_MC_USERS,		/* u32, multicast group users */
 	__IFA_MAX,
 };
 
Signature · 1 line
2.56.0
author maintainer
#3 lore raw

PATCH 3/12 tools headers UAPI: Sync linux/rtnetlink.h with the kernel sources

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

To pick up the changes in:

cc17e386f8a5 ("ipv6: add ip6_del_rt_reason()")

That just rebuilds perf, silencing this build warning.

This addresses this perf build warning:

Warning: Kernel ABI header differences:
diff -u tools/include/uapi/linux/rtnetlink.h include/uapi/linux/rtnetlink.h

Please see tools/include/uapi/README for further details.

---
 tools/include/uapi/linux/rtnetlink.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
tools/include/uapi/linux/rtnetlink.h +25 -0
index 27265fd31e5fc99c..3988b51db539fe4f 100644
@@ -399,6 +399,7 @@ enum rtattr_type_t {
 	RTA_DPORT,
 	RTA_NH_ID,
 	RTA_FLOWLABEL,
+	RTA_DEL_REASON,
 	__RTA_MAX
 };
 
@@ -407,6 +408,30 @@ enum rtattr_type_t {
 #define RTM_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg))))
 #define RTM_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct rtmsg))
 
+/* RTA_DEL_REASON: why the kernel deleted the route. u32.
+ * Emitted only on RTM_DELROUTE notifications, and only when the deletion
+ * path records a cause. Absence means either an older kernel or a
+ * deletion path that does not (yet) record its cause - consumers must
+ * treat "absent" and "unspec" identically. New causes may be appended.
+ * Currently only IPv6 deletion paths record a cause.
+ *
+ * The attribute is notification-only: the kernel rejects it in
+ * requests, so a notification must not be echoed back verbatim.
+ *
+ * The value space is family-agnostic: a value must never be
+ * reinterpreted per address family. A cause that only one family can
+ * produce still gets its own value rather than reusing another
+ * family's.
+ */
+enum rt_del_reason {
+	RT_DEL_REASON_UNSPEC,		/* cause not recorded */
+	RT_DEL_REASON_EXPIRED,		/* RTF_EXPIRES lifetime ran out (GC) */
+	RT_DEL_REASON_RA_WITHDRAWN,	/* zero-lifetime RA / PIO / RIO */
+	__RT_DEL_REASON_MAX
+};
+
+#define RT_DEL_REASON_MAX (__RT_DEL_REASON_MAX - 1)
+
 /* RTM_MULTIPATH --- array of struct rtnexthop.
  *
  * "struct rtnexthop" describes all necessary nexthop information,
Signature · 1 line
2.56.0
author maintainer
#4 lore raw

PATCH 4/12 tools headers: Sync linux/gfp_types.h with the kernel sources

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

To pick up the changes in:

f6c786a95e95 ("mm: gfp_types: fix __GFP_ACCOUNT, GFP_KERNEL_ACCOUNT documentation")

That just rebuilds perf, silencing this build warning.

This addresses this perf build warning:

Warning: Kernel ABI header differences:
diff -u tools/include/linux/gfp_types.h include/linux/gfp_types.h

Please see tools/include/uapi/README for further details.

---
 tools/include/linux/gfp_types.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tools/include/linux/gfp_types.h +3 -2
index da47aa089f01c992..190191411009f265 100644
@@ -134,7 +134,8 @@ enum {
  * %__GFP_THISNODE forces the allocation to be satisfied from the requested
  * node with no fallbacks or placement policy enforcements.
  *
- * %__GFP_ACCOUNT causes the allocation to be accounted to kmemcg.
+ * %__GFP_ACCOUNT causes the allocation to be accounted to the active
+ * cgroup context.
  */
 #define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE)
 #define __GFP_WRITE	((__force gfp_t)___GFP_WRITE)
@@ -313,7 +314,7 @@ enum {
  * %ZONE_NORMAL or a lower zone for direct access but can direct reclaim.
  *
  * %GFP_KERNEL_ACCOUNT is the same as GFP_KERNEL, except the allocation is
- * accounted to kmemcg.
+ * accounted to the active cgroup context.
  *
  * %GFP_NOWAIT is for kernel allocations that should not stall for direct
  * reclaim, start physical IO or use any filesystem callback.  It is very
Signature · 1 line
2.56.0
author maintainer
#5 lore raw

PATCH 5/12 tools headers x86 cpufeatures: Sync with the kernel sources

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

To pick up the changes in:

87db7795cbaa ("x86/CPU/AMD: Fix AMD TLBI Erratum #1718")
dcfb0f2c067a ("KVM: x86: Expose Zhaoxin RSA CPUID feature")
54db9aaacc2a ("KVM: x86: Expose Zhaoxin PHE2 CPUID feature")
93134f14106b ("KVM: x86: Expose Zhaoxin RNG2 CPUID feature")
3ee865eb696f ("KVM: x86: Expose Zhaoxin CCS (SM3 + SM4) CPUID feature") d99fc2a7c5e2 ("KVM: x86: Expose Zhaoxin SM2 CPUID feature")
ac5cc691eb4a ("x86/thermal: Add bit definitions for Intel Directed Package Thermal Interrupt")

That just rebuilds perf, silencing this build warning.

This addresses this perf build warning:

Warning: Kernel ABI header differences:
diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h

Please see tools/include/uapi/README for further details.

Cc Borislav Petkov (AMD) <[email protected]>
Cc Ewan Hai-oc <[email protected]>
Cc Ricardo Neri <[email protected]>
---
 tools/arch/x86/include/asm/cpufeatures.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
tools/arch/x86/include/asm/cpufeatures.h +15 -0
index 6547c0aee45b7781..fe84cf4e97d35a7d 100644
@@ -136,8 +136,12 @@
 #define X86_FEATURE_HYPERVISOR		( 4*32+31) /* "hypervisor" Running on a hypervisor */
 
 /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
+#define X86_FEATURE_SM2			( 5*32+ 0) /* "sm2" SM2 algorithm */
+#define X86_FEATURE_SM2_EN		( 5*32+ 1) /* "sm2_en" SM2 enabled */
 #define X86_FEATURE_XSTORE		( 5*32+ 2) /* "rng" RNG present (xstore) */
 #define X86_FEATURE_XSTORE_EN		( 5*32+ 3) /* "rng_en" RNG enabled */
+#define X86_FEATURE_CCS			( 5*32+ 4) /* "ccs" SM3 + SM4 instructions */
+#define X86_FEATURE_CCS_EN		( 5*32+ 5) /* "ccs_en" CCS enabled */
 #define X86_FEATURE_XCRYPT		( 5*32+ 6) /* "ace" on-CPU crypto (xcrypt) */
 #define X86_FEATURE_XCRYPT_EN		( 5*32+ 7) /* "ace_en" on-CPU crypto enabled */
 #define X86_FEATURE_ACE2		( 5*32+ 8) /* "ace2" Advanced Cryptography Engine v2 */
@@ -146,6 +150,12 @@
 #define X86_FEATURE_PHE_EN		( 5*32+11) /* "phe_en" PHE enabled */
 #define X86_FEATURE_PMM			( 5*32+12) /* "pmm" PadLock Montgomery Multiplier */
 #define X86_FEATURE_PMM_EN		( 5*32+13) /* "pmm_en" PMM enabled */
+#define X86_FEATURE_RNG2		( 5*32+22) /* "rng2" RNG v2 */
+#define X86_FEATURE_RNG2_EN		( 5*32+23) /* "rng2_en" RNG2 enabled */
+#define X86_FEATURE_PHE2		( 5*32+25) /* "phe2" PadLock Hash Engine v2 */
+#define X86_FEATURE_PHE2_EN		( 5*32+26) /* "phe2_en" PHE2 enabled */
+#define X86_FEATURE_RSA			( 5*32+27) /* "rsa" Big-number arithmetic */
+#define X86_FEATURE_RSA_EN		( 5*32+28) /* "rsa_en" RSA enabled */
 
 /* More extended AMD flags: CPUID level 0x80000001, ECX, word 6 */
 #define X86_FEATURE_LAHF_LM		( 6*32+ 0) /* "lahf_lm" LAHF/SAHF in long mode */
@@ -365,6 +375,8 @@
 #define X86_FEATURE_HWP_HIGHEST_PERF_CHANGE (14*32+15) /* HWP Highest perf change */
 #define X86_FEATURE_HFI			(14*32+19) /* "hfi" Hardware Feedback Interface */
 
+#define X86_FEATURE_DPTI		(14*32+24) /* Intel Directed Package Thermal Interrupt */
+
 /* AMD SVM Feature Identification, CPUID level 0x8000000a (EDX), word 15 */
 #define X86_FEATURE_NPT			(15*32+ 0) /* "npt" Nested Page Table support */
 #define X86_FEATURE_LBRV		(15*32+ 1) /* "lbrv" LBR Virtualization support */
@@ -465,6 +477,8 @@
 #define X86_FEATURE_NO_NESTED_DATA_BP	(20*32+ 0) /* No Nested Data Breakpoints */
 #define X86_FEATURE_WRMSR_XX_BASE_NS	(20*32+ 1) /* WRMSR to {FS,GS,KERNEL_GS}_BASE is non-serializing */
 #define X86_FEATURE_LFENCE_RDTSC	(20*32+ 2) /* LFENCE always serializing / synchronizes RDTSC */
+
+#define X86_FEATURE_TLBSYNC_SFW_NO	(20*32+ 4) /* TLBI Erratum #1718 fixed in microcode */
 #define X86_FEATURE_VERW_CLEAR		(20*32+ 5) /* The memory form of VERW mitigates TSA */
 #define X86_FEATURE_NULL_SEL_CLR_BASE	(20*32+ 6) /* Null Selector Clears Base */
 
@@ -575,4 +589,5 @@
 #define X86_BUG_TSA			X86_BUG( 1*32+ 9) /* "tsa" CPU is affected by Transient Scheduler Attacks */
 #define X86_BUG_VMSCAPE			X86_BUG( 1*32+10) /* "vmscape" CPU is affected by VMSCAPE attacks from guests */
 #define X86_BUG_SEAMRET_INVD_VMCS	X86_BUG( 1*32+11) /* "seamret_invd_vmcs" SEAMRET from P-SEAMLDR clears the current VMCS */
+#define X86_BUG_TLBI			X86_BUG( 1*32+12) /* "tlbi" AMD TLBI Erratum #1718 */
 #endif /* _ASM_X86_CPUFEATURES_H */
Signature · 1 line
2.56.0
author maintainer
#6 lore raw

PATCH 6/12 tools arch x86: Sync the msr-index.h copy with the kernel sources

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

To pick up the changes in:

ac5cc691eb4a ("x86/thermal: Add bit definitions for Intel Directed Package Thermal Interrupt")

That don't result in changes to the string tables generated from this header.

This addresses this perf build warning:

Warning: Kernel ABI header differences:
diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h

Please see tools/include/uapi/README for further details.

---
 tools/arch/x86/include/asm/msr-index.h | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
tools/arch/x86/include/asm/msr-index.h +2 -7
index 9c26d4075c5f421e..3a8e51a0c9e88cf3 100644
@@ -350,13 +350,6 @@
 #define ARCH_PEBS_LBR_SHIFT		40
 #define ARCH_PEBS_LBR			(0x3ull << ARCH_PEBS_LBR_SHIFT)
 #define ARCH_PEBS_VECR_XMM		BIT_ULL(49)
-#define ARCH_PEBS_VECR_YMMH		BIT_ULL(50)
-#define ARCH_PEBS_VECR_EGPRS		BIT_ULL(51)
-#define ARCH_PEBS_VECR_OPMASK		BIT_ULL(53)
-#define ARCH_PEBS_VECR_ZMMH		BIT_ULL(54)
-#define ARCH_PEBS_VECR_H16ZMM		BIT_ULL(55)
-#define ARCH_PEBS_VECR_EXT_SHIFT	49
-#define ARCH_PEBS_VECR_EXT		(0x7full << ARCH_PEBS_VECR_EXT_SHIFT)
 #define ARCH_PEBS_GPR			BIT_ULL(61)
 #define ARCH_PEBS_AUX			BIT_ULL(62)
 #define ARCH_PEBS_EN			BIT_ULL(63)
@@ -1014,6 +1007,7 @@
 #define THERM_INT_HIGH_ENABLE		(1 << 0)
 #define THERM_INT_LOW_ENABLE		(1 << 1)
 #define THERM_INT_PLN_ENABLE		(1 << 24)
+#define THERM_INT_DPTI_ENABLE		(1 << 25)
 
 #define MSR_IA32_THERM_STATUS		0x0000019c
 
@@ -1043,6 +1037,7 @@
 
 #define PACKAGE_THERM_STATUS_PROCHOT		(1 << 0)
 #define PACKAGE_THERM_STATUS_POWER_LIMIT	(1 << 10)
+#define PACKAGE_THERM_STATUS_DPTI_ACK		(1 << 25)
 #define PACKAGE_THERM_STATUS_HFI_UPDATED	(1 << 26)
 
 #define MSR_IA32_PACKAGE_THERM_INTERRUPT	0x000001b2
Signature · 1 line
2.56.0
author maintainer
#7 lore raw

PATCH 7/12 perf beauty: Update copy of linux/socket.h with the kernel sources

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

To pick up the changes in:

be3a5e06b962 ("net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD") 5bd369c05576 ("net: Add connect_socket() helper")

That don't result in changes to the string tables generated from this header.

This addresses this perf build warning:

Warning: Kernel ABI header differences:
diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h

Please see tools/include/uapi/README for further details.

---
 tools/perf/trace/beauty/include/linux/socket.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
tools/perf/trace/beauty/include/linux/socket.h +7 -4
index 2a8d7b14f1d11959..b17fdb7d38a7734a 100644
@@ -189,10 +189,11 @@ static inline size_t msg_data_left(const struct msghdr *msg)
 
 /* "Socket"-level control message types: */
 
-#define	SCM_RIGHTS	0x01		/* rw: access rights (array of int) */
-#define SCM_CREDENTIALS 0x02		/* rw: struct ucred		*/
-#define SCM_SECURITY	0x03		/* rw: security label		*/
-#define SCM_PIDFD	0x04		/* ro: pidfd (int)		*/
+#define	SCM_RIGHTS		0x01	/* rw: access rights (array of int) */
+#define SCM_CREDENTIALS		0x02	/* rw: struct ucred		*/
+#define SCM_SECURITY		0x03	/* rw: security label		*/
+#define SCM_PIDFD		0x04	/* ro: pidfd (int)		*/
+#define SCM_PIDFD_THREAD	0x05	/* ro: thread pidfd (int)	*/
 
 struct ucred {
 	__u32	pid;
@@ -461,6 +462,8 @@ extern struct file *__sys_socket_file(int family, int type, int protocol);
 extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen);
 extern int __sys_bind_socket(struct socket *sock, struct sockaddr_storage *address,
 			     int addrlen);
+int connect_socket(struct socket *sock, struct sockaddr_storage *addr,
+		   int addrlen, int flags);
 extern int __sys_connect_file(struct file *file, struct sockaddr_storage *addr,
 			      int addrlen, int file_flags);
 extern int __sys_connect(int fd, struct sockaddr __user *uservaddr,
Signature · 1 line
2.56.0
author maintainer
#9 lore raw

PATCH 8/12 tools headers: Sync UAPI linux/fcntl.h with the kernel sources

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

To pick up the changes in:

cdf930a00949 ("fs: support FD_FAILFS_ROOT in fchdir()")

That don't result in changes to the string tables generated from this header.

This addresses this perf build warning:

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 | 1 +
 1 file changed, 1 insertion(+)
tools/perf/trace/beauty/include/uapi/linux/fcntl.h +1 -0
index aadfbf6e0cb3a004..e43e3de3e9ee44a2 100644
@@ -124,6 +124,7 @@ struct delegation {
 
 #define FD_PIDFS_ROOT			-10002 /* Root of the pidfs filesystem */
 #define FD_NSFS_ROOT			-10003 /* Root of the nsfs filesystem */
+#define FD_FAILFS_ROOT			-10004 /* Root of the failfs filesystem */
 #define FD_INVALID			-10009 /* Invalid file descriptor: -10000 - EBADF = -10009 */
 
 /* Generic flags for the *at(2) family of syscalls. */
Signature · 1 line
2.56.0
author maintainer
#10 lore raw

PATCH 9/12 tools headers: Sync UAPI linux/fs.h with the kernel sources

In reply to Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

To pick up the changes in:

21a62663d473 ("fs: fix typos in comments")
338964881982 ("mm/pagemap: add PAGE_IS_ACCESSED for RWP tracking")

That don't result in changes to the string tables generated from this header.

This addresses this perf build warning:

Warning: Kernel ABI header differences:
diff -u tools/perf/trace/beauty/include/uapi/linux/fs.h include/uapi/linux/fs.h

Please see tools/include/uapi/README for further details.

Cc Hemanth Selam <[email protected]>
Cc Kiryl Shutsemau (Meta) <[email protected]>
---
 tools/perf/trace/beauty/include/uapi/linux/fs.h | 1 +
 1 file changed, 1 insertion(+)
tools/perf/trace/beauty/include/uapi/linux/fs.h +1 -0
index ee2203d606436f42..a46c33692aa21af0 100644
@@ -471,6 +471,7 @@ typedef int __bitwise __kernel_rwf_t;
 #define PAGE_IS_HUGE		(1 << 6)
 #define PAGE_IS_SOFT_DIRTY	(1 << 7)
 #define PAGE_IS_GUARD		(1 << 8)
+#define PAGE_IS_ACCESSED	(1 << 9)
 
 /*
  * struct page_region - Page region with flags
Signature · 1 line
2.56.0
Acked-by on v1 7/12
#8 lore raw

Re: [PATCH v1 07/12] perf beauty: Update copy of linux/socket.h with the kernel sources

In reply to Arnaldo Carvalho de Melo
Quoted 11 lines · Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <[email protected]>

To pick up the changes in:

be3a5e06b962 ("net: add SO_PASSPIDFD_THREAD to get a thread-specific SCM_PIDFD") 5bd369c05576 ("net: Add connect_socket() helper")

That don't result in changes to the string tables generated from this header.

This addresses this perf build warning:

Quoted 8 lines

Warning: Kernel ABI header differences:
diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h

Please see tools/include/uapi/README for further details.

Thank you Arnaldo.

Quoted 36 lines
---
 tools/perf/trace/beauty/include/linux/socket.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
tools/perf/trace/beauty/include/linux/socket.h +7 -4
index 2a8d7b14f1d11959..b17fdb7d38a7734a 100644
@@ -189,10 +189,11 @@ static inline size_t msg_data_left(const struct msghdr *msg)
 
 /* "Socket"-level control message types: */
 
-#define	SCM_RIGHTS	0x01		/* rw: access rights (array of int) */
-#define SCM_CREDENTIALS 0x02		/* rw: struct ucred		*/
-#define SCM_SECURITY	0x03		/* rw: security label		*/
-#define SCM_PIDFD	0x04		/* ro: pidfd (int)		*/
+#define	SCM_RIGHTS		0x01	/* rw: access rights (array of int) */
+#define SCM_CREDENTIALS		0x02	/* rw: struct ucred		*/
+#define SCM_SECURITY		0x03	/* rw: security label		*/
+#define SCM_PIDFD		0x04	/* ro: pidfd (int)		*/
+#define SCM_PIDFD_THREAD	0x05	/* ro: thread pidfd (int)	*/
 
 struct ucred {
 	__u32	pid;
@@ -461,6 +462,8 @@ extern struct file *__sys_socket_file(int family, int type, int protocol);
 extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen);
 extern int __sys_bind_socket(struct socket *sock, struct sockaddr_storage *address,
 			     int addrlen);
+int connect_socket(struct socket *sock, struct sockaddr_storage *addr,
+		   int addrlen, int flags);
 extern int __sys_connect_file(struct file *file, struct sockaddr_storage *addr,
 			      int addrlen, int file_flags);
 extern int __sys_connect(int fd, struct sockaddr __user *uservaddr,
Signature · 1 line
2.56.0