Re: [RFC PATCH 2/3] fs: support tasks with a null root or cwd
Christian Brauner <[email protected]> Mon, 29 Jun 2026 11:19:15 +0200
| Newsgroups | dev.linux.lists.netfs,org.kernel.vger.linux-api,org.kernel.vger.linux-arch,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs |
|---|---|
| Message-ID | <20260629-defizit-typisch-maulkorb-53953a5a8510@brauner> |
> 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 <[email protected]>