tools headers UAPI: Sync sched.h with the kernel

To get the changes in:

  ef2c41cf ("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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ca64d84e
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
/* Flags for the clone3() syscall. */ /* Flags for the clone3() syscall. */
#define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */ #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. */
/* /*
* cloning flags intersect with CSIGNAL so can be used with unshare and clone3 * cloning flags intersect with CSIGNAL so can be used with unshare and clone3
...@@ -81,6 +82,8 @@ ...@@ -81,6 +82,8 @@
* @set_tid_size: This defines the size of the array referenced * @set_tid_size: This defines the size of the array referenced
* in @set_tid. This cannot be larger than the * in @set_tid. This cannot be larger than the
* kernel's limit of nested PID namespaces. * kernel's limit of nested PID namespaces.
* @cgroup: If CLONE_INTO_CGROUP is specified set this to
* a file descriptor for the cgroup.
* *
* The structure is versioned by size and thus extensible. * The structure is versioned by size and thus extensible.
* New struct members must go at the end of the struct and * New struct members must go at the end of the struct and
...@@ -97,11 +100,13 @@ struct clone_args { ...@@ -97,11 +100,13 @@ struct clone_args {
__aligned_u64 tls; __aligned_u64 tls;
__aligned_u64 set_tid; __aligned_u64 set_tid;
__aligned_u64 set_tid_size; __aligned_u64 set_tid_size;
__aligned_u64 cgroup;
}; };
#endif #endif
#define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */ #define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */
#define CLONE_ARGS_SIZE_VER1 80 /* sizeof second published struct */ #define CLONE_ARGS_SIZE_VER1 80 /* sizeof second published struct */
#define CLONE_ARGS_SIZE_VER2 88 /* sizeof third published struct */
/* /*
* Scheduling policies * Scheduling policies
......
...@@ -46,6 +46,7 @@ static size_t clone__scnprintf_flags(unsigned long flags, char *bf, size_t size, ...@@ -46,6 +46,7 @@ static size_t clone__scnprintf_flags(unsigned long flags, char *bf, size_t size,
P_FLAG(NEWNET); P_FLAG(NEWNET);
P_FLAG(IO); P_FLAG(IO);
P_FLAG(CLEAR_SIGHAND); P_FLAG(CLEAR_SIGHAND);
P_FLAG(INTO_CGROUP);
#undef P_FLAG #undef P_FLAG
if (flags) if (flags)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment