Skip to content

Commit 027fa8f

Browse files
committed
tools headers UAPI: Sync sched.h with the kernel
To get the changes in: ef2c41c ("clone3: allow spawning processes into cgroups") Add that to 'perf trace's clone 'flags' decoder. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/sched.h' differs from latest version at 'include/uapi/linux/sched.h' diff -u tools/include/uapi/linux/sched.h include/uapi/linux/sched.h Cc: Adrian Hunter <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent ca64d84 commit 027fa8f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tools/include/uapi/linux/sched.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
/* Flags for the clone3() syscall. */
3737
#define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */
38+
#define CLONE_INTO_CGROUP 0x200000000ULL /* Clone into a specific cgroup given the right permissions. */
3839

3940
/*
4041
* cloning flags intersect with CSIGNAL so can be used with unshare and clone3
@@ -81,6 +82,8 @@
8182
* @set_tid_size: This defines the size of the array referenced
8283
* in @set_tid. This cannot be larger than the
8384
* kernel's limit of nested PID namespaces.
85+
* @cgroup: If CLONE_INTO_CGROUP is specified set this to
86+
* a file descriptor for the cgroup.
8487
*
8588
* The structure is versioned by size and thus extensible.
8689
* New struct members must go at the end of the struct and
@@ -97,11 +100,13 @@ struct clone_args {
97100
__aligned_u64 tls;
98101
__aligned_u64 set_tid;
99102
__aligned_u64 set_tid_size;
103+
__aligned_u64 cgroup;
100104
};
101105
#endif
102106

103107
#define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */
104108
#define CLONE_ARGS_SIZE_VER1 80 /* sizeof second published struct */
109+
#define CLONE_ARGS_SIZE_VER2 88 /* sizeof third published struct */
105110

106111
/*
107112
* Scheduling policies

tools/perf/trace/beauty/clone.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ static size_t clone__scnprintf_flags(unsigned long flags, char *bf, size_t size,
4646
P_FLAG(NEWNET);
4747
P_FLAG(IO);
4848
P_FLAG(CLEAR_SIGHAND);
49+
P_FLAG(INTO_CGROUP);
4950
#undef P_FLAG
5051

5152
if (flags)

0 commit comments

Comments
 (0)