tools headers UAPI: Sync sched.h with the kernel

To get the changes in:

  0acefef5 ("Merge tag 'threads-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux")
  49cb2fc4 ("fork: extend clone3() to support setting a PID")
  fa729c4d ("clone3: validate stack arguments")
  b612e5df ("clone3: add CLONE_CLEAR_SIGHAND")

This file gets rebuilt, but no changes ensues:

   CC       /tmp/build/perf/trace/beauty/clone.o

This addresses 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.

The CLONE_CLEAR_SIGHAND one will be used in tools/perf/trace/beauty/clone.c
in a followup patch to show that string when this bit is set in the
syscall arg. Keeping a copy of this file allows us to build this in
older systems and have the binary support printing that flag whenever
that system gets its kernel updated to one where this feature is
present.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Adrian Reber <areber@redhat.com>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-nprqsvvzbhzoy64cbvos6c5b@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 1fc3d0ee
...@@ -33,27 +33,48 @@ ...@@ -33,27 +33,48 @@
#define CLONE_NEWNET 0x40000000 /* New network namespace */ #define CLONE_NEWNET 0x40000000 /* New network namespace */
#define CLONE_IO 0x80000000 /* Clone io context */ #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. */
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/** /**
* struct clone_args - arguments for the clone3 syscall * struct clone_args - arguments for the clone3 syscall
* @flags: Flags for the new process as listed above. * @flags: Flags for the new process as listed above.
* All flags are valid except for CSIGNAL and * All flags are valid except for CSIGNAL and
* CLONE_DETACHED. * CLONE_DETACHED.
* @pidfd: If CLONE_PIDFD is set, a pidfd will be * @pidfd: If CLONE_PIDFD is set, a pidfd will be
* returned in this argument. * returned in this argument.
* @child_tid: If CLONE_CHILD_SETTID is set, the TID of the * @child_tid: If CLONE_CHILD_SETTID is set, the TID of the
* child process will be returned in the child's * child process will be returned in the child's
* memory. * memory.
* @parent_tid: If CLONE_PARENT_SETTID is set, the TID of * @parent_tid: If CLONE_PARENT_SETTID is set, the TID of
* the child process will be returned in the * the child process will be returned in the
* parent's memory. * parent's memory.
* @exit_signal: The exit_signal the parent process will be * @exit_signal: The exit_signal the parent process will be
* sent when the child exits. * sent when the child exits.
* @stack: Specify the location of the stack for the * @stack: Specify the location of the stack for the
* child process. * child process.
* @stack_size: The size of the stack for the child process. * Note, @stack is expected to point to the
* @tls: If CLONE_SETTLS is set, the tls descriptor * lowest address. The stack direction will be
* is set to tls. * determined by the kernel and set up
* appropriately based on @stack_size.
* @stack_size: The size of the stack for the child process.
* @tls: If CLONE_SETTLS is set, the tls descriptor
* is set to tls.
* @set_tid: Pointer to an array of type *pid_t. The size
* of the array is defined using @set_tid_size.
* This array is used to select PIDs/TIDs for
* newly created processes. The first element in
* this defines the PID in the most nested PID
* namespace. Each additional element in the array
* defines the PID in the parent PID namespace of
* the original PID namespace. If the array has
* less entries than the number of currently
* nested PID namespaces only the PIDs in the
* corresponding namespaces are set.
* @set_tid_size: This defines the size of the array referenced
* in @set_tid. This cannot be larger than the
* kernel's limit of nested PID namespaces.
* *
* 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
...@@ -68,10 +89,13 @@ struct clone_args { ...@@ -68,10 +89,13 @@ struct clone_args {
__aligned_u64 stack; __aligned_u64 stack;
__aligned_u64 stack_size; __aligned_u64 stack_size;
__aligned_u64 tls; __aligned_u64 tls;
__aligned_u64 set_tid;
__aligned_u64 set_tid_size;
}; };
#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 */
/* /*
* Scheduling policies * Scheduling policies
......
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