From: technoboy85@gmail.com
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org, Matteo Croce <teknoraver@meta.com>
Subject: [PATCH v3] proc.5: document 'subset' mount option.
Date: Tue, 14 May 2024 22:28:19 +0200 [thread overview]
Message-ID: <20240514202819.95347-1-technoboy85@gmail.com> (raw)
From: Matteo Croce <teknoraver@meta.com>
The 'subset=pid' option was added in commit 6814ef2d, document it.
This option mounts a procfs where only the numeric directories related
to the PIDs are present.
# mount -t proc proc_pid pid -o subset=pid
# mount |grep -w proc_pid
proc_pid on /tmp/proc/pid type proc (rw,relatime,subset=pid)
# ll -d pid/{1,$$,cmdline,version}
ls: cannot access 'pid/cmdline': No such file or directory
ls: cannot access 'pid/version': No such file or directory
dr-xr-xr-x. 9 root root 0 May 14 09:43 pid/1
dr-xr-xr-x. 9 root root 0 May 14 09:43 pid/25146
The only non-numeric entries in that procfs instance are
'self' and 'thread-self':
# ls pid |grep -vx '[[:digit:]]*'
self
thread-self
#
Signed-off-by: Matteo Croce <teknoraver@meta.com>
---
man/man5/proc.5 | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/man/man5/proc.5 b/man/man5/proc.5
index 8022ca49e..cdb4aa859 100644
--- a/man/man5/proc.5
+++ b/man/man5/proc.5
@@ -105,7 +105,12 @@ This group should be used instead of approaches such as putting
nonroot users into the
.BR sudoers (5)
file.
-.\"
+.RE
+.TP
+.BR subset = pid " (since Linux 5.8)"
+.\" commit 6814ef2d992af09451bbeda4770daa204461329e
+Show only the specified subset of procfs hiding all top level files
+and directories in the procfs that are not related to tasks.
.SS Overview
Underneath
.IR /proc ,
--
2.43.0
next reply other threads:[~2024-05-14 20:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 20:28 technoboy85 [this message]
2024-05-17 21:21 ` [PATCH v3] proc.5: document 'subset' mount option 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=20240514202819.95347-1-technoboy85@gmail.com \
--to=technoboy85@gmail.com \
--cc=alx@kernel.org \
--cc=linux-man@vger.kernel.org \
--cc=teknoraver@meta.com \
/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