All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx+linux-man@kernel.org>
To: "Niklas Hambüchen" <mail@nh2.me>
Cc: linux-man@vger.kernel.org, Christian Brauner <brauner@kernel.org>
Subject: Re: man 2 unshare: UNSHARE_EMPTY_MNTNS
Date: Fri, 20 Nov 2026 00:22:52 +0100	[thread overview]
Message-ID: <av-DinDzrAeN_1mU@devuan> (raw)
In-Reply-To: <64fb02fd-0ffa-4311-bf21-a3211e9d599e@nh2.me>

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

Hi Niklas, Christian,

> Date: 2026-11-12 17:42:33+0100
> From: Niklas Hambüchen <mail@nh2.me>
>
> Dear man pages maintainers,
> 
> I just want to point out that unshare has a new flag in Linux >= 7.1:
> UNSHARE_EMPTY_MNTNS
> 
> See e.g.
> https://github.com/torvalds/linux/commit/9d4e752a24f740b31ca827bfab07010e4e7f34b0#diff-871f39f0834631ea368e8539ee88840ade11866cd6104e91543f9387dd1b8386R39-R52
> 
> "
> This is useful for containers and sandboxes that want to
> start with a minimal mount table and populate it from scratch rather
> than inheriting and then tearing down the full mount tree.
> "
> 
> Note a little quirk caused by this change:
> 
> This is the first `unshare` flag that isn't a `CLONE_*` one, so it breaks the existing invariant that all `unshare` flags are also valid `clone3` flags.
> The commit remarks:

That same commit also adds CLONE_EMPTY_MNTNS (according to the commit
message, for clone3(2)).  Could you explain why there are two separate
flags?  Would you mind writing a patch for the manual pages?

> 
> "
>  * unshare flags share the bit space with clone flags but only apply to the
>  * unshare syscall:
> "
> 
> I guess that part isn't really relevant for the man page, but I
> thought to point it out on this list, for searchability of this fact.

It's probably relevant, I'd say.


Have a lovely night!
Alex

> 
> Cheers,
> Niklas
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2026-11-19 23:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 16:42 man 2 unshare: UNSHARE_EMPTY_MNTNS Niklas Hambüchen
2026-11-19 23:22 ` Alejandro Colomar [this message]

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=av-DinDzrAeN_1mU@devuan \
    --to=alx+linux-man@kernel.org \
    --cc=brauner@kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mail@nh2.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.