* [PATCH 1/5] perf trace: Sync linux/socket.h with the kernel source
2026-05-03 19:31 [PATCH 0/5] perf build: Update kernel headers Namhyung Kim
@ 2026-05-03 19:31 ` Namhyung Kim
2026-05-03 19:31 ` [PATCH 2/5] perf trace: Sync uapi/linux/fs.h " Namhyung Kim
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Namhyung Kim @ 2026-05-03 19:31 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, James Clark, Linus Torvalds
Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
linux-perf-users, Ravi Bangoria, netdev
To pick up changes from:
c66e0f453d1afa82 ("net: use ktime_t in struct scm_timestamping_internal")
This would be used to beautify networking syscall arguments and not to
affect builds of other tools (e.g. objtool).
Please see tools/include/uapi/README.
Cc: netdev@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/trace/beauty/include/linux/socket.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/trace/beauty/include/linux/socket.h b/tools/perf/trace/beauty/include/linux/socket.h
index ec715ad4bf25f5f7..ec4a0a0257939a53 100644
--- a/tools/perf/trace/beauty/include/linux/socket.h
+++ b/tools/perf/trace/beauty/include/linux/socket.h
@@ -415,7 +415,7 @@ struct __kernel_timespec;
struct old_timespec32;
struct scm_timestamping_internal {
- struct timespec64 ts[3];
+ ktime_t ts[3];
};
extern void put_cmsg_scm_timestamping64(struct msghdr *msg, struct scm_timestamping_internal *tss);
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/5] perf trace: Sync uapi/linux/fs.h with the kernel source
2026-05-03 19:31 [PATCH 0/5] perf build: Update kernel headers Namhyung Kim
2026-05-03 19:31 ` [PATCH 1/5] perf trace: Sync linux/socket.h with the kernel source Namhyung Kim
@ 2026-05-03 19:31 ` Namhyung Kim
2026-05-03 19:31 ` [PATCH 3/5] perf trace: Sync uapi/linux/mount.h " Namhyung Kim
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Namhyung Kim @ 2026-05-03 19:31 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, James Clark, Linus Torvalds
Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
linux-perf-users, Ravi Bangoria, linux-fsdevel
To pick up changes from:
1f662195dbc07a66 ("fs: add generic FS_IOC_SHUTDOWN definitions")
This would be used to beautify filesystem syscall arguments and not to
affect builds of other tools (e.g. objtool).
Please see tools/include/uapi/README.
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/trace/beauty/include/uapi/linux/fs.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tools/perf/trace/beauty/include/uapi/linux/fs.h b/tools/perf/trace/beauty/include/uapi/linux/fs.h
index 70b2b661f42cb6e5..13f71202845e8f9e 100644
--- a/tools/perf/trace/beauty/include/uapi/linux/fs.h
+++ b/tools/perf/trace/beauty/include/uapi/linux/fs.h
@@ -657,4 +657,16 @@ struct procmap_query {
__u64 build_id_addr; /* in */
};
+/*
+ * Shutdown the filesystem.
+ */
+#define FS_IOC_SHUTDOWN _IOR('X', 125, __u32)
+
+/*
+ * Flags for FS_IOC_SHUTDOWN
+ */
+#define FS_SHUTDOWN_FLAGS_DEFAULT 0x0
+#define FS_SHUTDOWN_FLAGS_LOGFLUSH 0x1 /* flush log but not data*/
+#define FS_SHUTDOWN_FLAGS_NOLOGFLUSH 0x2 /* don't flush log nor data */
+
#endif /* _UAPI_LINUX_FS_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/5] perf trace: Sync uapi/linux/mount.h with the kernel source
2026-05-03 19:31 [PATCH 0/5] perf build: Update kernel headers Namhyung Kim
2026-05-03 19:31 ` [PATCH 1/5] perf trace: Sync linux/socket.h with the kernel source Namhyung Kim
2026-05-03 19:31 ` [PATCH 2/5] perf trace: Sync uapi/linux/fs.h " Namhyung Kim
@ 2026-05-03 19:31 ` Namhyung Kim
2026-05-04 19:33 ` sashiko-bot
2026-05-03 19:31 ` [PATCH 4/5] perf trace: Sync uapi/linux/sched.h " Namhyung Kim
2026-05-03 19:31 ` [PATCH 5/5] perf build: Add make check-headers target Namhyung Kim
4 siblings, 1 reply; 9+ messages in thread
From: Namhyung Kim @ 2026-05-03 19:31 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, James Clark, Linus Torvalds
Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
linux-perf-users, Ravi Bangoria, linux-fsdevel
To pick up changes from:
5e8969bd19271241 ("mount: add FSMOUNT_NAMESPACE")
This would be used to beautify mount syscall arguments and not to
affect builds of other tools (e.g. objtool).
Please see tools/include/uapi/README.
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/trace/beauty/include/uapi/linux/mount.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/trace/beauty/include/uapi/linux/mount.h b/tools/perf/trace/beauty/include/uapi/linux/mount.h
index d9d86598d100cb32..2204708dbf7a583a 100644
--- a/tools/perf/trace/beauty/include/uapi/linux/mount.h
+++ b/tools/perf/trace/beauty/include/uapi/linux/mount.h
@@ -110,6 +110,7 @@ enum fsconfig_command {
* fsmount() flags.
*/
#define FSMOUNT_CLOEXEC 0x00000001
+#define FSMOUNT_NAMESPACE 0x00000002 /* Create the mount in a new mount namespace */
/*
* Mount attributes.
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 3/5] perf trace: Sync uapi/linux/mount.h with the kernel source
2026-05-03 19:31 ` [PATCH 3/5] perf trace: Sync uapi/linux/mount.h " Namhyung Kim
@ 2026-05-04 19:33 ` sashiko-bot
0 siblings, 0 replies; 9+ messages in thread
From: sashiko-bot @ 2026-05-04 19:33 UTC (permalink / raw)
To: Namhyung Kim; +Cc: linux-perf-users
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit syncs `uapi/linux/mount.h` to pick up the `FSMOUNT_NAMESPACE` flag, with the commit message explicitly claiming "This would be used to beautify mount syscall arguments". However, unlike `MOUNT_ATTR_*` flags which are automatically parsed by `tools/perf/trace/beauty/fsmount.sh`, the `FSMOUNT_*` flags are strictly hardcoded in `tools/perf/builtin-trace.c` (`static const char *fsmount_flags[] = { [1] = "CLOEXEC", };`). Because `[2] = "NAMESPACE"` was not manually added to this array, the new flag will not be beautified.
--
commit 41bba49a1df4092fb9de0814ee5b9c785fd42578
Author: Namhyung Kim <namhyung@kernel.org>
perf trace: Sync uapi/linux/mount.h with the kernel source
This commit syncs the uapi/linux/mount.h header to pick up the new
FSMOUNT_NAMESPACE flag.
> diff --git a/tools/perf/trace/beauty/include/uapi/linux/mount.h b/tools/perf/trace/beauty/include/uapi/linux/mount.h
> index d9d86598d100..2204708dbf7a 100644
> --- a/tools/perf/trace/beauty/include/uapi/linux/mount.h
> +++ b/tools/perf/trace/beauty/include/uapi/linux/mount.h
> @@ -110,6 +110,7 @@ enum fsconfig_command {
> * fsmount() flags.
> */
> #define FSMOUNT_CLOEXEC 0x00000001
> +#define FSMOUNT_NAMESPACE 0x00000002 /* Create the mount in a new mount namespace */
The commit message states: "This would be used to beautify mount syscall
arguments". Will this header sync be enough to beautify the new flag?
Looking at tools/perf/builtin-trace.c, the fsmount_flags array is manually
hardcoded:
static const char *fsmount_flags[] = {
[1] = "CLOEXEC",
};
Since [2] = "NAMESPACE" is not present in this array, ARRAY_SIZE(fsmount_flags)
remains 2. The loop in strarray__scnprintf_flags() checks up to index 1.
Does the FSMOUNT_NAMESPACE flag also need to be manually added to the
fsmount_flags array in builtin-trace.c for the beautification to work?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260503193137.27465-1-namhyung@kernel.org?part=3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/5] perf trace: Sync uapi/linux/sched.h with the kernel source
2026-05-03 19:31 [PATCH 0/5] perf build: Update kernel headers Namhyung Kim
` (2 preceding siblings ...)
2026-05-03 19:31 ` [PATCH 3/5] perf trace: Sync uapi/linux/mount.h " Namhyung Kim
@ 2026-05-03 19:31 ` Namhyung Kim
2026-05-04 19:33 ` sashiko-bot
2026-05-03 19:31 ` [PATCH 5/5] perf build: Add make check-headers target Namhyung Kim
4 siblings, 1 reply; 9+ messages in thread
From: Namhyung Kim @ 2026-05-03 19:31 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, James Clark, Linus Torvalds
Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
linux-perf-users, Ravi Bangoria
To pick up changes from:
9d4e752a24f740b3 ("namespace: allow creating empty mount namespaces")
c8134b5f13ae959d ("pidfd: add CLONE_PIDFD_AUTOKILL")
24baca56fafc33d4 ("clone: add CLONE_NNP")
12ae2c81b21cfaa1 ("clone: add CLONE_AUTOREAP")
2e7af192697ef2a7 ("sched/deadline: Add reporting of runtime left & ...")
This would be used to beautify scheduler syscall arguments and not to
affect builds of other tools (e.g. objtool).
Please see tools/include/uapi/README.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
.../trace/beauty/include/uapi/linux/sched.h | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/tools/perf/trace/beauty/include/uapi/linux/sched.h b/tools/perf/trace/beauty/include/uapi/linux/sched.h
index 359a14cc76a4038a..33a4624285cd4179 100644
--- a/tools/perf/trace/beauty/include/uapi/linux/sched.h
+++ b/tools/perf/trace/beauty/include/uapi/linux/sched.h
@@ -34,8 +34,12 @@
#define CLONE_IO 0x80000000 /* Clone io context */
/* Flags for the clone3() syscall. */
-#define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */
-#define CLONE_INTO_CGROUP 0x200000000ULL /* Clone into a specific cgroup given the right permissions. */
+#define CLONE_CLEAR_SIGHAND (1ULL << 32) /* Clear any signal handler and reset to SIG_DFL. */
+#define CLONE_INTO_CGROUP (1ULL << 33) /* Clone into a specific cgroup given the right permissions. */
+#define CLONE_AUTOREAP (1ULL << 34) /* Auto-reap child on exit. */
+#define CLONE_NNP (1ULL << 35) /* Set no_new_privs on child. */
+#define CLONE_PIDFD_AUTOKILL (1ULL << 36) /* Kill child when clone pidfd closes. */
+#define CLONE_EMPTY_MNTNS (1ULL << 37) /* Create an empty mount namespace. */
/*
* cloning flags intersect with CSIGNAL so can be used with unshare and clone3
@@ -43,6 +47,12 @@
*/
#define CLONE_NEWTIME 0x00000080 /* New time namespace */
+/*
+ * unshare flags share the bit space with clone flags but only apply to the
+ * unshare syscall:
+ */
+#define UNSHARE_EMPTY_MNTNS 0x00100000 /* Unshare an empty mount namespace. */
+
#ifndef __ASSEMBLY__
/**
* struct clone_args - arguments for the clone3 syscall
@@ -146,4 +156,7 @@ struct clone_args {
SCHED_FLAG_KEEP_ALL | \
SCHED_FLAG_UTIL_CLAMP)
+/* Only for sched_getattr() own flag param, if task is SCHED_DEADLINE */
+#define SCHED_GETATTR_FLAG_DL_DYNAMIC 0x01
+
#endif /* _UAPI_LINUX_SCHED_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 4/5] perf trace: Sync uapi/linux/sched.h with the kernel source
2026-05-03 19:31 ` [PATCH 4/5] perf trace: Sync uapi/linux/sched.h " Namhyung Kim
@ 2026-05-04 19:33 ` sashiko-bot
0 siblings, 0 replies; 9+ messages in thread
From: sashiko-bot @ 2026-05-04 19:33 UTC (permalink / raw)
To: Namhyung Kim; +Cc: linux-perf-users
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `clone.sh` beautification script fails to parse the new `(1ULL << X)` format for `CLONE_` macros, resulting in missing syscall argument translations in `perf trace`.
--
commit 21b4f549d315112f3b383339c5af0152f585767e
Author: Namhyung Kim <namhyung@kernel.org>
perf trace: Sync uapi/linux/sched.h with the kernel source
This commit synchronizes the tools/perf uapi sched.h with the kernel source
to pick up new clone flags for beautifying scheduler syscall arguments.
> diff --git a/tools/perf/trace/beauty/include/uapi/linux/sched.h b/tools/perf/trace/beauty/include/uapi/linux/sched.h
> index 359a14cc76a4..33a4624285cd 100644
> --- a/tools/perf/trace/beauty/include/uapi/linux/sched.h
> +++ b/tools/perf/trace/beauty/include/uapi/linux/sched.h
> @@ -34,8 +34,12 @@
> #define CLONE_IO 0x80000000 /* Clone io context */
>
> /* Flags for the clone3() syscall. */
> -#define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */
> -#define CLONE_INTO_CGROUP 0x200000000ULL /* Clone into a specific cgroup given the right permissions. */
> +#define CLONE_CLEAR_SIGHAND (1ULL << 32) /* Clear any signal handler and reset to SIG_DFL. */
> +#define CLONE_INTO_CGROUP (1ULL << 33) /* Clone into a specific cgroup given the right permissions. */
> +#define CLONE_AUTOREAP (1ULL << 34) /* Auto-reap child on exit. */
> +#define CLONE_NNP (1ULL << 35) /* Set no_new_privs on child. */
> +#define CLONE_PIDFD_AUTOKILL (1ULL << 36) /* Kill child when clone pidfd closes. */
> +#define CLONE_EMPTY_MNTNS (1ULL << 37) /* Create an empty mount namespace. */
Will this format change cause a regression in the clone flags beautifier?
Looking at tools/perf/trace/beauty/clone.sh, it uses a regular expression
expecting hexadecimal values to extract the flags: (0x[[:xdigit:]]+).
Because these updated macros now use a bitwise shift format instead of hex
values, they might be silently ignored by the script during parsing. This
would result in perf trace failing to translate these flags, printing raw
numeric values instead.
Does the regex in clone.sh also need to be updated to handle the new
format?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260503193137.27465-1-namhyung@kernel.org?part=4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 5/5] perf build: Add make check-headers target
2026-05-03 19:31 [PATCH 0/5] perf build: Update kernel headers Namhyung Kim
` (3 preceding siblings ...)
2026-05-03 19:31 ` [PATCH 4/5] perf trace: Sync uapi/linux/sched.h " Namhyung Kim
@ 2026-05-03 19:31 ` Namhyung Kim
2026-05-04 19:33 ` sashiko-bot
4 siblings, 1 reply; 9+ messages in thread
From: Namhyung Kim @ 2026-05-03 19:31 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Ian Rogers, James Clark, Linus Torvalds
Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
linux-perf-users, Ravi Bangoria
Don't print header differences during the perf build as it's noisy.
Mostly people won't care and find it annoying.
As it's to improve perf trace beautifier to catch up new changes mostly
in UAPIs, we can make it a separate build target and call it
occasionally.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/Makefile | 3 +++
tools/perf/Makefile.perf | 1 -
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 816d5d84816b3d53..e072a41e05eaab5f 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -111,6 +111,9 @@ endif # MAKECMDGOALS
build-test-tarball:
@$(MAKE) -f tests/make REUSE_FEATURES_DUMP=1 MK=Makefile SET_PARALLEL=1 --no-print-directory out
+check-headers:
+ @./check-headers.sh
+
#
# All other targets get passed through:
#
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index cee19c923c0607d2..585637fc934fe6ec 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -285,7 +285,6 @@ goals := $(filter-out all sub-make, $(MAKECMDGOALS))
$(goals) all: sub-make
sub-make: fixdep
- @./check-headers.sh
$(Q)$(MAKE) FIXDEP_BUILT=1 -f Makefile.perf $(goals)
else # force_fixdep
--
2.53.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 5/5] perf build: Add make check-headers target
2026-05-03 19:31 ` [PATCH 5/5] perf build: Add make check-headers target Namhyung Kim
@ 2026-05-04 19:33 ` sashiko-bot
0 siblings, 0 replies; 9+ messages in thread
From: sashiko-bot @ 2026-05-04 19:33 UTC (permalink / raw)
To: Namhyung Kim; +Cc: linux-perf-users
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The `tools/include/uapi/README` documentation was not updated to reflect the removal of the automated header synchronization check.
- [Low] The new `check-headers` target in `tools/perf/Makefile` is missing a `.PHONY` declaration.
--
commit dd1cd2c298920f9790f61d618060d62047bed876
Author: Namhyung Kim <namhyung@kernel.org>
perf build: Add make check-headers target
This commit removes the automated check-headers.sh script execution from
the default perf build and adds a dedicated check-headers Make target to
be called manually instead.
> As it's to improve perf trace beautifier to catch up new changes mostly
> in UAPIs, we can make it a separate build target and call it
> occasionally.
Does this change require an update to tools/include/uapi/README?
The README currently documents a "software-enforced copy-on-write mechanism"
that is "driven by non-fatal warnings on the tooling side build."
Since this is no longer automated during routine builds, developers might miss
UAPI changes if they rely on the currently documented behavior.
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
[ ... ]
> @@ -111,6 +111,9 @@ build-test:
> build-test-tarball:
> @$(MAKE) -f tests/make REUSE_FEATURES_DUMP=1 MK=Makefile SET_PARALLEL=1 --no-print-directory out
>
> +check-headers:
> + @./check-headers.sh
> +
Should check-headers be added to the .PHONY declarations?
Since check-headers is a command target and does not produce an artifact by
that name, if a file or directory named check-headers is ever created in
tools/perf/, Make will consider the target up to date and silently skip
executing the script.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260503193137.27465-1-namhyung@kernel.org?part=5
^ permalink raw reply [flat|nested] 9+ messages in thread