From: Alyssa Ross <hi@alyssa.is>
To: Alejandro Colomar <alx@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org, linux-man@vger.kernel.org
Subject: Re: [PATCH] man/man2/setns.2: clarify type of nsfs fd required
Date: Sat, 13 Dec 2025 19:59:04 +0100 [thread overview]
Message-ID: <87qzsy5htz.fsf@alyssa.is> (raw)
In-Reply-To: <iddnfcdrppivtq53zrajuiidfmg6sw6bxdg57j2ielnnor4mlk@i7ddvvhfu7dm>
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
Alejandro Colomar <alx@kernel.org> writes:
> Hi Alyssa,
>
> On Sat, Dec 13, 2025 at 06:58:53PM +0100, Alyssa Ross wrote:
>> I was surprised to discover than an O_PATH file descriptor was
>> insufficient.
>
> How did you discover it? Could you please link to relevant information
> (or kernel sources)?
By trying it!
Presumably it's the fd_empty() check at the beginning of the syscall
implementation in nsproxy.c.
>> Since the mode of nsfs files is always 0444, tell
>> callers to always a file descriptor opened for reading.
>
> Missing 'use'?
Yes. Feel free to add it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2025-12-13 18:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-13 17:58 Alyssa Ross
2025-12-13 18:44 ` Alejandro Colomar
2025-12-13 18:59 ` Alyssa Ross [this message]
2025-12-13 19:37 ` 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=87qzsy5htz.fsf@alyssa.is \
--to=hi@alyssa.is \
--cc=alx@kernel.org \
--cc=brauner@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®