Re: [PATCH v3] clone.2: Fix erroneous statement about CLONE_NEWPID|CLONE_PARENT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-08-13 15:55, Alejandro Colomar wrote:
[...]

> ---
>  man2/clone.2 | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/man2/clone.2 b/man2/clone.2
> index b91b71831..7d2dc2339 100644
> --- a/man2/clone.2
> +++ b/man2/clone.2
> @@ -736,9 +736,7 @@ .SS The flags mask
>  can employ
>  .BR CLONE_NEWPID .
>  This flag can't be specified in conjunction with
> -.B CLONE_THREAD
> -or
> -.BR CLONE_PARENT .
> +.BR CLONE_THREAD .
>  .TP
>  .B CLONE_NEWUSER
>  (This flag first became meaningful for

Hmm, it seems this patch was incomplete.  This is a reminder that we
should specify 'Fixes: ...commit...' for these fixes as much as
possible.  Doing that, I found that the commit that it fixes did more
than that, and we need to fix those places too.  :)

I'll prepare a v4 reverting that patch entirely.

Cheers,
Alex


$ git show f00071920e
commit f00071920ec3ff5ed3ae2a8933259c535aae15a6
Author: Michael Kerrisk <mtk.manpages@xxxxxxxxx>
Date:   Tue Mar 5 09:55:39 2013 +0100

    clone.2: EINVAL if (CLONE_NEWUSER|CLONE_NEWPID) && (CLONE_THREAD|CLONE_PARENT)
    
    Signed-off-by: Michael Kerrisk <mtk.manpages@xxxxxxxxx>

diff --git a/man2/clone.2 b/man2/clone.2
index 5193e43af..e99b69b1e 100644
--- a/man2/clone.2
+++ b/man2/clone.2
@@ -407,7 +407,9 @@ .SH DESCRIPTION
 can employ
 .BR CLONE_NEWPID .
 This flag can't be specified in conjunction with
-.BR CLONE_THREAD .
+.BR CLONE_THREAD
+or
+.BR CLONE_PARENT .
 .TP
 .BR CLONE_NEWUSER
 (This flag first became meaningful for
@@ -441,6 +443,12 @@ .SH DESCRIPTION
 .\" Before Linux 2.6.29, it appears that only CAP_SYS_ADMIN was needed
 Starting with Linux 3.8,
 no privileges are needed to create a user namespace.
+
+.BR CLONE_NEWUSER
+cannot be specified in conjunction with
+.BR CLONE_NEWPID
+or
+.BR CLONE_PARENT .
 .TP
 .BR CLONE_NEWUTS " (since Linux 2.6.19)"
 If
@@ -895,10 +903,14 @@ .SH ERRORS
 .IR flags .
 .TP
 .B EINVAL
-Both
+One (or both) of
 .BR CLONE_NEWPID
-and
+or
+.BR CLONE_NEWUSER
+and one (or both) of
 .BR CLONE_THREAD
+or
+.BR CLONE_PARENT
 were specified in
 .IR flags .
 .TP


-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux