From f8d0dc21d409c0ecb921f4ae1ab3e0763a26c979 Mon Sep 17 00:00:00 2001 From: Waiman Long Date: Tue, 23 Oct 2018 17:25:51 -0400 Subject: Documentation/proc.txt: Add 2 missing fields for /proc//status It was found that two of the fields in the /proc//status file were missing - CapAmb & Speculation_Store_Bypass. They are now added to the proc.txt documentation file. v2: Update the example as well. Signed-off-by: Waiman Long Signed-off-by: Jonathan Corbet --- Documentation/filesystems/proc.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Documentation/filesystems/proc.txt') diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 12a5e6e693b6..a078efad9957 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -193,8 +193,10 @@ read the file /proc/PID/status: CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: ffffffffffffffff + CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 + Speculation_Store_Bypass: thread vulnerable voluntary_ctxt_switches: 0 nonvoluntary_ctxt_switches: 1 @@ -214,7 +216,7 @@ asynchronous manner and the value may not be very precise. To see a precise snapshot of a moment, you can see /proc//smaps file and scan page table. It's slow but very precise. -Table 1-2: Contents of the status files (as of 4.8) +Table 1-2: Contents of the status files (as of 4.19) .............................................................................. Field Content Name filename of the executable @@ -267,8 +269,10 @@ Table 1-2: Contents of the status files (as of 4.8) CapPrm bitmap of permitted capabilities CapEff bitmap of effective capabilities CapBnd bitmap of capabilities bounding set + CapAmb bitmap of ambient capabilities NoNewPrivs no_new_privs, like prctl(PR_GET_NO_NEW_PRIV, ...) Seccomp seccomp mode, like prctl(PR_GET_SECCOMP, ...) + Speculation_Store_Bypass speculative store bypass mitigation status Cpus_allowed mask of CPUs on which this process may run Cpus_allowed_list Same as previous, but in "list format" Mems_allowed mask of memory nodes allowed to this process -- cgit v1.2.3-59-g8ed1b From c969eb830175f42b6cc0c8e80f6fce452fd75788 Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Mon, 5 Nov 2018 13:22:05 +0000 Subject: Document /proc/pid PID reuse behavior State explicitly that holding a /proc/pid file descriptor open does not reserve the PID. Also note that in the event of PID reuse, these open file descriptors refer to the old, now-dead process, and not the new one that happens to be named the same numeric PID. Signed-off-by: Daniel Colascione Acked-by: Michal Hocko Reviewed-by: Mike Rapoport Signed-off-by: Jonathan Corbet --- Documentation/filesystems/proc.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Documentation/filesystems/proc.txt') diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a078efad9957..af88fa238786 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -125,6 +125,13 @@ process running on the system, which is named after the process ID (PID). The link self points to the process reading the file system. Each process subdirectory has the entries listed in Table 1-1. +Note that an open a file descriptor to /proc/ or to any of its +contained files or subdirectories does not prevent being reused +for some other process in the event that exits. Operations on +open /proc/ file descriptors corresponding to dead processes +never act on any new process that the kernel may, through chance, have +also assigned the process ID . Instead, operations on these FDs +usually fail with ESRCH. Table 1-1: Process specific entries in /proc .............................................................................. -- cgit v1.2.3-59-g8ed1b