linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <christian@brauner.io>
To: mtk.manpages@gmail.com
Cc: adrian@lisas.de, akpm@linux-foundation.org, arnd@arndb.de,
	avagin@gmail.com, christian.brauner@ubuntu.com,
	dhowells@redhat.com, fweimer@redhat.com, jannh@google.com,
	keescook@chromium.org, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-man@vger.kernel.org,
	mingo@elte.hu, oleg@redhat.com, xemul@virtuozzo.com
Subject: [PATCH 3/3] clone.2: Use pid_t for clone3() {child,parent}_tid
Date: Sat, 16 Nov 2019 12:41:14 +0100	[thread overview]
Message-ID: <20191116114114.7066-3-christian@brauner.io> (raw)
In-Reply-To: <20191116114114.7066-1-christian@brauner.io>

From: Christian Brauner <christian.brauner@ubuntu.com>

Advertise to userspace that they should use proper pid_t types for
arguments returning a pid.
The kernel-internal struct kernel_clone_args currently uses int as type
and since POSIX mandates that pid_t is a signed integer type and glibc
and friends use int this is not an issue. After the merge window for
v5.5 closes we can switch struct kernel_clone_args over to using pid_t
as well without any danger in regressing current userspace.
Also note, that the new set tid feature which will be merged for v5.5
uses pid_t types as well.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
 man2/clone.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man2/clone.2 b/man2/clone.2
index faff2ada6..bf2d7c731 100644
--- a/man2/clone.2
+++ b/man2/clone.2
@@ -183,9 +183,9 @@ is a structure of the following form:
 struct clone_args {
     u64 flags;        /* Flags bit mask */
     u64 pidfd;        /* Where to store PID file descriptor
-                         (\fIint *\fP) */
+                         (\fIpid_t *\fP) */
     u64 child_tid;    /* Where to store child TID,
-                         in child's memory (\fIint *\fP) */
+                         in child's memory (\fIpid_t *\fP) */
     u64 parent_tid;   /* Where to store child TID,
                          in parent's memory (\fIint *\fP) */
     u64 exit_signal;  /* Signal to deliver to parent on
-- 
2.24.0


  parent reply	other threads:[~2019-11-16 11:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-16 11:41 [PATCH 1/3] clone.2: Fix typos Christian Brauner
2019-11-16 11:41 ` [PATCH 2/3] clone.2: Check for MAP_FAILED not NULL on mmap() Christian Brauner
2019-11-17 18:01   ` Michael Kerrisk (man-pages)
2019-11-16 11:41 ` Christian Brauner [this message]
2019-11-17 18:02   ` [PATCH 3/3] clone.2: Use pid_t for clone3() {child,parent}_tid Michael Kerrisk (man-pages)
2019-11-17 18:00 ` [PATCH 1/3] clone.2: Fix typos Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191116114114.7066-3-christian@brauner.io \
    --to=christian@brauner.io \
    --cc=adrian@lisas.de \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=avagin@gmail.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=dhowells@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mtk.manpages@gmail.com \
    --cc=oleg@redhat.com \
    --cc=xemul@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).