public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: John Watts <contact@jookia.org>
To: Alejandro Colomar <alx@kernel.org>
Cc: Sargun Dhillon <sargun@sargun.me>, linux-man@vger.kernel.org
Subject: Re: [PATCH] clone.2: Fix the erroneous statement about CLONE_NEWPID
Date: Sun, 13 Aug 2023 05:05:10 +1000	[thread overview]
Message-ID: <ZNfX5ilXYK3Ut8Tr@titan> (raw)
In-Reply-To: <923b82cd-9bfe-44bd-1d8b-26fa35799d64@kernel.org>

On Sat, Aug 12, 2023 at 07:51:43PM +0200, Alejandro Colomar wrote:
> Does this depend on any recent kernel version?  In my system,
> the assertion fails.
> 
> 
> $ cat clone.c 
> ...
> 
> $ cc -Wall -Wextra clone.c 
> $ ./a.out 
> main program:  pid: 18783, and ppid: 18703
> a.out: clone.c:24: main: Assertion `ret != -1' failed.
> Aborted

On my systerm I get the same result. strace says this:

clone3({flags=CLONE_PARENT|CLONE_NEWPID, exit_signal=0, stack=NULL, stack_size=0}, 88) = -1 EPERM (Operation not permitted)

However when running as root it works.

John.

  reply	other threads:[~2023-08-12 19:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  2:26 [PATCH] clone.2: Fix the erroneous statement about CLONE_NEWPID Sargun Dhillon
2023-08-12 17:48 ` Alejandro Colomar
2023-08-12 17:51   ` Alejandro Colomar
2023-08-12 19:05     ` John Watts [this message]
2023-08-13  0:57       ` Sargun Dhillon
2023-08-13 13:17         ` [PATCH v2] clone.2: Fix outdated " Alejandro Colomar
2023-08-13 13:35           ` Serge E. Hallyn
2023-08-13 13:40             ` Alejandro Colomar
2023-08-13 13:53               ` Serge E. Hallyn
2023-08-13 13:55 ` [PATCH v3] clone.2: Fix erroneous statement about CLONE_NEWPID|CLONE_PARENT Alejandro Colomar
2023-08-13 14:03   ` Alejandro Colomar
2023-08-13 14:36   ` Serge E. Hallyn
2023-08-13 14:37     ` Alejandro Colomar
2023-08-13 14:40       ` Alejandro Colomar
2023-08-13 14:14 ` [PATCH v4] " Alejandro Colomar

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=ZNfX5ilXYK3Ut8Tr@titan \
    --to=contact@jookia.org \
    --cc=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=sargun@sargun.me \
    /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