Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: fs: proc.rst: convert a new chapter to ReST

A new chapter was added to proc.rst. Adjust the markups
to avoid this warning:

Documentation/filesystems/proc.rst:2194: WARNING: Inconsistent literal block quoting.

And to properly mark the code-blocks there.

Fixes: 37e7647a7212 ("docs: proc: add documentation for "hidepid=4" and "subset=pid" options and new mount behavior")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/de67ec04a2e735f4450eb3ce966f7d80b9438244.1592895969.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
565dbe72 985098a0

+21 -23
+21 -23
Documentation/filesystems/proc.rst
··· 2179 2179 are not related to tasks. 2180 2180 2181 2181 5 Filesystem behavior 2182 - ---------------------------- 2182 + --------------------------- 2183 2183 2184 2184 Originally, before the advent of pid namepsace, procfs was a global file 2185 2185 system. It means that there was only one procfs instance in the system. 2186 2186 2187 2187 When pid namespace was added, a separate procfs instance was mounted in 2188 2188 each pid namespace. So, procfs mount options are global among all 2189 - mountpoints within the same namespace. 2189 + mountpoints within the same namespace:: 2190 2190 2191 - :: 2191 + # grep ^proc /proc/mounts 2192 + proc /proc proc rw,relatime,hidepid=2 0 0 2192 2193 2193 - # grep ^proc /proc/mounts 2194 - proc /proc proc rw,relatime,hidepid=2 0 0 2194 + # strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc 2195 + mount("proc", "/tmp/proc", "proc", 0, "hidepid=1") = 0 2196 + +++ exited with 0 +++ 2195 2197 2196 - # strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc 2197 - mount("proc", "/tmp/proc", "proc", 0, "hidepid=1") = 0 2198 - +++ exited with 0 +++ 2199 - 2200 - # grep ^proc /proc/mounts 2201 - proc /proc proc rw,relatime,hidepid=2 0 0 2202 - proc /tmp/proc proc rw,relatime,hidepid=2 0 0 2198 + # grep ^proc /proc/mounts 2199 + proc /proc proc rw,relatime,hidepid=2 0 0 2200 + proc /tmp/proc proc rw,relatime,hidepid=2 0 0 2203 2201 2204 2202 and only after remounting procfs mount options will change at all 2205 - mountpoints. 2203 + mountpoints:: 2206 2204 2207 - # mount -o remount,hidepid=1 -t proc proc /tmp/proc 2205 + # mount -o remount,hidepid=1 -t proc proc /tmp/proc 2208 2206 2209 - # grep ^proc /proc/mounts 2210 - proc /proc proc rw,relatime,hidepid=1 0 0 2211 - proc /tmp/proc proc rw,relatime,hidepid=1 0 0 2207 + # grep ^proc /proc/mounts 2208 + proc /proc proc rw,relatime,hidepid=1 0 0 2209 + proc /tmp/proc proc rw,relatime,hidepid=1 0 0 2212 2210 2213 2211 This behavior is different from the behavior of other filesystems. 2214 2212 2215 2213 The new procfs behavior is more like other filesystems. Each procfs mount 2216 2214 creates a new procfs instance. Mount options affect own procfs instance. 2217 2215 It means that it became possible to have several procfs instances 2218 - displaying tasks with different filtering options in one pid namespace. 2216 + displaying tasks with different filtering options in one pid namespace:: 2219 2217 2220 - # mount -o hidepid=invisible -t proc proc /proc 2221 - # mount -o hidepid=noaccess -t proc proc /tmp/proc 2222 - # grep ^proc /proc/mounts 2223 - proc /proc proc rw,relatime,hidepid=invisible 0 0 2224 - proc /tmp/proc proc rw,relatime,hidepid=noaccess 0 0 2218 + # mount -o hidepid=invisible -t proc proc /proc 2219 + # mount -o hidepid=noaccess -t proc proc /tmp/proc 2220 + # grep ^proc /proc/mounts 2221 + proc /proc proc rw,relatime,hidepid=invisible 0 0 2222 + proc /tmp/proc proc rw,relatime,hidepid=noaccess 0 0