Skip to content

Commit 5eca137

Browse files
committed
tools headers UAPI: Sync sched.h with the kernel
To get the changes in: 78f6fac ("sched: add kernel-doc for struct clone_args") f14c234 ("clone3: switch to copy_struct_from_user()") 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.h Cc: Adrian Hunter <[email protected]> Cc: Aleksa Sarai <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 8daf1fb commit 5eca137

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

tools/include/uapi/linux/sched.h

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,31 @@
3333
#define CLONE_NEWNET 0x40000000 /* New network namespace */
3434
#define CLONE_IO 0x80000000 /* Clone io context */
3535

36-
/*
37-
* Arguments for the clone3 syscall
36+
#ifndef __ASSEMBLY__
37+
/**
38+
* struct clone_args - arguments for the clone3 syscall
39+
* @flags: Flags for the new process as listed above.
40+
* All flags are valid except for CSIGNAL and
41+
* CLONE_DETACHED.
42+
* @pidfd: If CLONE_PIDFD is set, a pidfd will be
43+
* returned in this argument.
44+
* @child_tid: If CLONE_CHILD_SETTID is set, the TID of the
45+
* child process will be returned in the child's
46+
* memory.
47+
* @parent_tid: If CLONE_PARENT_SETTID is set, the TID of
48+
* the child process will be returned in the
49+
* parent's memory.
50+
* @exit_signal: The exit_signal the parent process will be
51+
* sent when the child exits.
52+
* @stack: Specify the location of the stack for the
53+
* child process.
54+
* @stack_size: The size of the stack for the child process.
55+
* @tls: If CLONE_SETTLS is set, the tls descriptor
56+
* is set to tls.
57+
*
58+
* The structure is versioned by size and thus extensible.
59+
* New struct members must go at the end of the struct and
60+
* must be properly 64bit aligned.
3861
*/
3962
struct clone_args {
4063
__aligned_u64 flags;
@@ -46,6 +69,9 @@ struct clone_args {
4669
__aligned_u64 stack_size;
4770
__aligned_u64 tls;
4871
};
72+
#endif
73+
74+
#define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */
4975

5076
/*
5177
* Scheduling policies

0 commit comments

Comments
 (0)