[PATCH v9 5/5] docs: proc: add documentation about mount restrictions
Alexey Gladkov <[email protected]> Mon, 13 Apr 2026 13:19:44 +0200
| Newsgroups | dev.linux.lists.containers,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <8d9734a83d9b85130485d76c3562064f836b7361.1776079055.git.legion@kernel.org> |
procfs has a number of mounting restrictions that are not documented anywhere. Signed-off-by: Alexey Gladkov <[email protected]> --- Documentation/filesystems/proc.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst index b0c0d1b45b99..699cc372e6c8 100644 --- a/Documentation/filesystems/proc.rst +++ b/Documentation/filesystems/proc.rst @@ -52,6 +52,7 @@ fixes/update part 1.1 Stefani Seibold <[email protected]> June 9 2009 4 Configuring procfs 4.1 Mount options + 4.2 Mount restrictions 5 Filesystem behavior @@ -2410,6 +2411,20 @@ will use the calling process's active pid namespace. Note that the pid namespace of an existing procfs instance cannot be modified (attempting to do so will give an `-EBUSY` error). +4.2 Mount restrictions +-------------------------- + +If user namespaces are in use, the kernel additionally checks the instances of +procfs available to the mounter and will not allow procfs to be mounted if: + + 1. This mount is not fully visible unless the new procfs is going to be + mounted with subset=pid option. + + a. It's root directory is not the root directory of the filesystem. + b. If any file or non-empty procfs directory is hidden by another mount. + + 2. A new mount overrides the readonly option or any option from atime familty. + Chapter 5: Filesystem behavior ============================== -- 2.53.0