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

tools headers UAPI: Sync sched.h with the kernel

To get the changes in:

ef2c41cf38a7 ("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 <adrian.hunter@intel.com>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+6
+5
tools/include/uapi/linux/sched.h
··· 35 35 36 36 /* Flags for the clone3() syscall. */ 37 37 #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. */ 38 39 39 40 /* 40 41 * cloning flags intersect with CSIGNAL so can be used with unshare and clone3 ··· 82 81 * @set_tid_size: This defines the size of the array referenced 83 82 * in @set_tid. This cannot be larger than the 84 83 * kernel's limit of nested PID namespaces. 84 + * @cgroup: If CLONE_INTO_CGROUP is specified set this to 85 + * a file descriptor for the cgroup. 85 86 * 86 87 * The structure is versioned by size and thus extensible. 87 88 * New struct members must go at the end of the struct and ··· 100 97 __aligned_u64 tls; 101 98 __aligned_u64 set_tid; 102 99 __aligned_u64 set_tid_size; 100 + __aligned_u64 cgroup; 103 101 }; 104 102 #endif 105 103 106 104 #define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */ 107 105 #define CLONE_ARGS_SIZE_VER1 80 /* sizeof second published struct */ 106 + #define CLONE_ARGS_SIZE_VER2 88 /* sizeof third published struct */ 108 107 109 108 /* 110 109 * Scheduling policies
+1
tools/perf/trace/beauty/clone.c
··· 46 46 P_FLAG(NEWNET); 47 47 P_FLAG(IO); 48 48 P_FLAG(CLEAR_SIGHAND); 49 + P_FLAG(INTO_CGROUP); 49 50 #undef P_FLAG 50 51 51 52 if (flags)