Thread (4 messages) 4 messages, 2 authors, 2025-12-13

Re: [PATCH] man/man2/setns.2: clarify type of nsfs fd required

From: Alyssa Ross <hidden>
Date: 2025-12-13 18:59:13
Also in: lkml

Alejandro Colomar [off-list ref] writes:
Hi Alyssa,

On Sat, Dec 13, 2025 at 06:58:53PM +0100, Alyssa Ross wrote:
quoted
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.
quoted
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.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help