mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-21 18:25:26 -04:00
Merge tag 'perf-tools-fixes-for-v7.1-2026-05-18' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
Pull perf-tools fixes "An usual sync-up for the header files and related code: - copy headers that are used for perf trace syscall beautifier - update the beautifier scripts according to the changes - don't show differences in the headers by default" * tag 'perf-tools-fixes-for-v7.1-2026-05-18' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: perf trace: Update beautifier script for clone flags perf trace: Add beautifier script for fsmount flags perf build: Add make check-headers target perf trace: Sync uapi/linux/sched.h with the kernel source perf trace: Sync uapi/linux/mount.h with the kernel source perf trace: Sync uapi/linux/fs.h with the kernel source perf trace: Sync linux/socket.h with the kernel source
This commit is contained in:
@@ -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
|
||||
|
||||
#
|
||||
# All other targets get passed through:
|
||||
#
|
||||
@@ -118,4 +121,4 @@ build-test-tarball:
|
||||
$(print_msg)
|
||||
$(make)
|
||||
|
||||
.PHONY: tags TAGS FORCE Makefile
|
||||
.PHONY: tags TAGS FORCE Makefile build-test build-test-tarball check-headers
|
||||
|
||||
@@ -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
|
||||
@@ -565,6 +564,12 @@ fsmount_tbls := $(srctree)/tools/perf/trace/beauty/fsmount.sh
|
||||
$(fsmount_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_tbls)
|
||||
$(Q)$(SHELL) '$(fsmount_tbls)' $(beauty_uapi_linux_dir) > $@
|
||||
|
||||
fsmount_attr_arrays := $(beauty_outdir)/fsmount_attr_arrays.c
|
||||
fsmount_attr_tbls := $(srctree)/tools/perf/trace/beauty/fsmount_attr.sh
|
||||
|
||||
$(fsmount_attr_arrays): $(beauty_uapi_linux_dir)/mount.h $(fsmount_attr_tbls)
|
||||
$(Q)$(SHELL) '$(fsmount_attr_tbls)' $(beauty_uapi_linux_dir) > $@
|
||||
|
||||
fspick_arrays := $(beauty_outdir)/fspick_arrays.c
|
||||
fspick_tbls := $(srctree)/tools/perf/trace/beauty/fspick.sh
|
||||
|
||||
@@ -855,6 +860,7 @@ prepare: $(OUTPUT)PERF-VERSION-FILE archheaders \
|
||||
$(fadvise_advice_array) \
|
||||
$(fsconfig_arrays) \
|
||||
$(fsmount_arrays) \
|
||||
$(fsmount_attr_arrays) \
|
||||
$(fspick_arrays) \
|
||||
$(pkey_alloc_access_rights_array) \
|
||||
$(sndrv_pcm_ioctl_array) \
|
||||
@@ -1302,6 +1308,7 @@ clean:: $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBSYMBOL)-clean $(
|
||||
$(OUTPUT)$(fadvise_advice_array) \
|
||||
$(OUTPUT)$(fsconfig_arrays) \
|
||||
$(OUTPUT)$(fsmount_arrays) \
|
||||
$(OUTPUT)$(fsmount_attr_arrays) \
|
||||
$(OUTPUT)$(fspick_arrays) \
|
||||
$(OUTPUT)$(madvise_behavior_array) \
|
||||
$(OUTPUT)$(mmap_flags_array) \
|
||||
|
||||
@@ -771,11 +771,6 @@ static const char *bpf_cmd[] = {
|
||||
};
|
||||
static DEFINE_STRARRAY(bpf_cmd, "BPF_");
|
||||
|
||||
static const char *fsmount_flags[] = {
|
||||
[1] = "CLOEXEC",
|
||||
};
|
||||
static DEFINE_STRARRAY(fsmount_flags, "FSMOUNT_");
|
||||
|
||||
#include "trace/beauty/generated/fsconfig_arrays.c"
|
||||
|
||||
static DEFINE_STRARRAY(fsconfig_cmds, "FSCONFIG_");
|
||||
@@ -1202,7 +1197,9 @@ static const struct syscall_fmt syscall_fmts[] = {
|
||||
{ .name = "fsconfig",
|
||||
.arg = { [1] = STRARRAY(cmd, fsconfig_cmds), }, },
|
||||
{ .name = "fsmount",
|
||||
.arg = { [1] = STRARRAY_FLAGS(flags, fsmount_flags),
|
||||
.arg = { [1] = { .scnprintf = SCA_FSMOUNT_FLAGS, /* fsmount_flags */
|
||||
.strtoul = STUL_STRARRAYS,
|
||||
.show_zero = true, },
|
||||
[2] = { .scnprintf = SCA_FSMOUNT_ATTR_FLAGS, /* attr_flags */ }, }, },
|
||||
{ .name = "fspick",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ },
|
||||
|
||||
@@ -179,6 +179,9 @@ size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_ar
|
||||
size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_FLOCK syscall_arg__scnprintf_flock
|
||||
|
||||
size_t syscall_arg__scnprintf_fsmount_flags(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_FSMOUNT_FLAGS syscall_arg__scnprintf_fsmount_flags
|
||||
|
||||
size_t syscall_arg__scnprintf_fsmount_attr_flags(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_FSMOUNT_ATTR_FLAGS syscall_arg__scnprintf_fsmount_attr_flags
|
||||
|
||||
|
||||
@@ -14,4 +14,8 @@ regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+CLONE_([^_]+[[:alnum:]_]+)[[:
|
||||
grep -E $regex ${linux_sched} | \
|
||||
sed -r "s/$regex/\2 \1/g" | \
|
||||
xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
|
||||
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+CLONE_([^_]+[[:alnum:]_]+)[[:space:]]+\(1ULL[[:space:]]*<<[[:space:]]*([[:digit:]]+)\)[[:space:]]*.*'
|
||||
grep -E $regex ${linux_sched} | \
|
||||
sed -r "s/$regex/\2 \1/g" | \
|
||||
xargs printf "\t[%s + 1] = \"%s\",\n"
|
||||
printf "};\n"
|
||||
|
||||
@@ -16,9 +16,25 @@
|
||||
#define MOUNT_ATTR_RELATIME 0x00000000 /* - Update atime relative to mtime/ctime. */
|
||||
#endif
|
||||
|
||||
static size_t fsmount__scnprintf_attr_flags(unsigned long flags, char *bf, size_t size, bool show_prefix)
|
||||
|
||||
static size_t fsmount__scnprintf_flags(unsigned long flags, char *bf, size_t size, bool show_prefix)
|
||||
{
|
||||
#include "trace/beauty/generated/fsmount_arrays.c"
|
||||
static DEFINE_STRARRAY(fsmount_flags, "FSMOUNT_");
|
||||
|
||||
return strarray__scnprintf_flags(&strarray__fsmount_flags, bf, size, show_prefix, flags);
|
||||
}
|
||||
|
||||
size_t syscall_arg__scnprintf_fsmount_flags(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
unsigned long flags = arg->val;
|
||||
|
||||
return fsmount__scnprintf_flags(flags, bf, size, arg->show_string_prefix);
|
||||
}
|
||||
|
||||
static size_t fsmount__scnprintf_attr_flags(unsigned long flags, char *bf, size_t size, bool show_prefix)
|
||||
{
|
||||
#include "trace/beauty/generated/fsmount_attr_arrays.c"
|
||||
static DEFINE_STRARRAY(fsmount_attr_flags, "MOUNT_ATTR_");
|
||||
size_t printed = 0;
|
||||
|
||||
|
||||
@@ -9,14 +9,9 @@ fi
|
||||
|
||||
linux_mount=${beauty_uapi_linux_dir}/mount.h
|
||||
|
||||
# Remove MOUNT_ATTR_RELATIME as it is zeros, handle it a special way in the beautifier
|
||||
# Only handle MOUNT_ATTR_ followed by a capital letter/num as __ is special case
|
||||
# for things like MOUNT_ATTR__ATIME that is a mask for the possible ATIME handling
|
||||
# bits. Special case it as well in the beautifier
|
||||
|
||||
printf "static const char *fsmount_attr_flags[] = {\n"
|
||||
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOUNT_ATTR_([[:alnum:]][[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
|
||||
grep -E $regex ${linux_mount} | grep -v MOUNT_ATTR_RELATIME | \
|
||||
printf "static const char *fsmount_flags[] = {\n"
|
||||
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+FSMOUNT_([[:alnum:]][[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
|
||||
grep -E $regex ${linux_mount} | \
|
||||
sed -r "s/$regex/\2 \1/g" | \
|
||||
xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
|
||||
printf "};\n"
|
||||
|
||||
22
tools/perf/trace/beauty/fsmount_attr.sh
Normal file
22
tools/perf/trace/beauty/fsmount_attr.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: LGPL-2.1
|
||||
|
||||
if [ $# -ne 1 ] ; then
|
||||
beauty_uapi_linux_dir=tools/perf/trace/beauty/include/uapi/linux/
|
||||
else
|
||||
beauty_uapi_linux_dir=$1
|
||||
fi
|
||||
|
||||
linux_mount=${beauty_uapi_linux_dir}/mount.h
|
||||
|
||||
# Remove MOUNT_ATTR_RELATIME as it is zeros, handle it a special way in the beautifier
|
||||
# Only handle MOUNT_ATTR_ followed by a capital letter/num as __ is special case
|
||||
# for things like MOUNT_ATTR__ATIME that is a mask for the possible ATIME handling
|
||||
# bits. Special case it as well in the beautifier
|
||||
|
||||
printf "static const char *fsmount_attr_flags[] = {\n"
|
||||
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOUNT_ATTR_([[:alnum:]][[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
|
||||
grep -E $regex ${linux_mount} | grep -v MOUNT_ATTR_RELATIME | \
|
||||
sed -r "s/$regex/\2 \1/g" | \
|
||||
xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
|
||||
printf "};\n"
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user