linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] document clone3 and struct clone_args
@ 2019-10-01 11:47 Christian Brauner
  2019-10-01 11:47 ` [PATCH 1/2] fork: add kernel-doc for clone3 Christian Brauner
  2019-10-01 11:47 ` [PATCH 2/2] sched: add kernel-doc for struct clone_args Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Brauner @ 2019-10-01 11:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Joel Fernandes (Google),
	Peter Zijlstra, Steven Rostedt, Thomas Gleixner,
	Christian Brauner

Hey,

This adds missing kernel-docs for the clone3() syscall and its argument
struct clone_args. I somehow failed to add this right away.

I intend to include this in my rc2 pull request.

Thanks!
Christian

Christian Brauner (2):
  fork: add kernel-doc for clone3
  sched: add kernel-doc for struct clone_args

 include/uapi/linux/sched.h | 26 ++++++++++++++++++++++++--
 kernel/fork.c              | 11 +++++++++++
 2 files changed, 35 insertions(+), 2 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] fork: add kernel-doc for clone3
  2019-10-01 11:47 [PATCH 0/2] document clone3 and struct clone_args Christian Brauner
@ 2019-10-01 11:47 ` Christian Brauner
  2019-10-01 11:47 ` [PATCH 2/2] sched: add kernel-doc for struct clone_args Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2019-10-01 11:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Joel Fernandes (Google),
	Peter Zijlstra, Steven Rostedt, Thomas Gleixner,
	Christian Brauner

Add kernel-doc for the clone3() syscall.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
 kernel/fork.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index 5a0fd518e04e..c819cce9bdd0 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2590,6 +2590,17 @@ static bool clone3_args_valid(const struct kernel_clone_args *kargs)
 	return true;
 }
 
+/**
+ * clone3 - create a new process with specific properties
+ * @uargs: argument structure
+ * @size:  size of @uargs
+ *
+ * clone3() is the extensible successor to clone()/clone2().
+ * It takes a struct as argument that is versioned by its size.
+ *
+ * Return: On success, a positive PID for the child process.
+ *         On error, a negative errno number.
+ */
 SYSCALL_DEFINE2(clone3, struct clone_args __user *, uargs, size_t, size)
 {
 	int err;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] sched: add kernel-doc for struct clone_args
  2019-10-01 11:47 [PATCH 0/2] document clone3 and struct clone_args Christian Brauner
  2019-10-01 11:47 ` [PATCH 1/2] fork: add kernel-doc for clone3 Christian Brauner
@ 2019-10-01 11:47 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2019-10-01 11:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Joel Fernandes (Google),
	Peter Zijlstra, Steven Rostedt, Thomas Gleixner,
	Christian Brauner

Add kernel-doc for struct clone_args for the clone3() syscall.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
 include/uapi/linux/sched.h | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/sched.h b/include/uapi/linux/sched.h
index 851ff1feadd5..3d8f03bfd428 100644
--- a/include/uapi/linux/sched.h
+++ b/include/uapi/linux/sched.h
@@ -34,8 +34,30 @@
 #define CLONE_IO		0x80000000	/* Clone io context */
 
 #ifndef __ASSEMBLY__
-/*
- * Arguments for the clone3 syscall
+/**
+ * struct clone_args - arguments for the clone3 syscall
+ * @flags:       Flags for the new process as listed above.
+ *               All flags are valid except for CSIGNAL and
+ *               CLONE_DETACHED.
+ * @pidfd:       If CLONE_PIDFD is set, a pidfd will be
+ *               returned in this argument.
+ * @child_tid:   If CLONE_CHILD_SETTID is set, the TID of the
+ *               child process will be returned in the child's
+ *               memory.
+ * @parent_tid:  If CLONE_PARENT_SETTID is set, the TID of
+ *               the child process will be returned in the
+ *               parent's memory.
+ * @exit_signal: The exit_signal the parent process will be
+ *               sent when the child exits.
+ * @stack:       Specify the location of the stack for the
+ *               child process.
+ * @stack_size:  The size of the stack for the child process.
+ * @tls:         If CLONE_SETTLS is set, the tls descriptor
+ *               is set to tls.
+ *
+ * The structure is versioned by size and thus extensible.
+ * New struct members must go at the end of the struct and
+ * must be properly 64bit aligned.
  */
 struct clone_args {
 	__aligned_u64 flags;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-01 11:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 11:47 [PATCH 0/2] document clone3 and struct clone_args Christian Brauner
2019-10-01 11:47 ` [PATCH 1/2] fork: add kernel-doc for clone3 Christian Brauner
2019-10-01 11:47 ` [PATCH 2/2] sched: add kernel-doc for struct clone_args Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).