Thread (5 messages) 5 messages, 2 authors, 29d ago

Re: [RFC PATCH 2/3] fs: support tasks with a null root or cwd

From: Christian Brauner <brauner@kernel.org>
Date: 2026-06-29 09:19:25
Also in: linux-arch, linux-fsdevel, linux-nfs, lkml, netfs

A task's root directory (`fs->root`) and current working directory
(`fs->pwd`) are normally established by `chroot(2)`/`pivot_root(2)` and
`chdir(2)`/`fchdir(2)` (or inherited across `fork(2)`). Allow either to
instead be the null path, as documented in `struct fs_struct`. The two
are independent: a task may opt out of one, the other, or both.
No, absolutely we're not going to have tasks with struct path's in their
struct fs_struct that have NULL members in them. struct path is used
insanely widely in the kernel this is just an an open invitation for a
slew of security bugs. Not going to happen.

-- 
Christian Brauner [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help