aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2012-12-17 19:03:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-17 20:15:22 -0500
commit2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816 (patch)
treed4db7dc0ff5972232e2edbf08004e4ee838823c2 /Documentation/filesystems
parent834f82e2aa9a8ede94b17b656329f850c1471514 (diff)
/proc/pid/status: add "Seccomp" field
It is currently impossible to examine the state of seccomp for a given process. While attaching with gdb and attempting "call prctl(PR_GET_SECCOMP,...)" will work with some situations, it is not reliable. If the process is in seccomp mode 1, this query will kill the process (prctl not allowed), if the process is in mode 2 with prctl not allowed, it will similarly be killed, and in weird cases, if prctl is filtered to return errno 0, it can look like seccomp is disabled. When reviewing the state of running processes, there should be a way to externally examine the seccomp mode. ("Did this build of Chrome end up using seccomp?" "Did my distro ship ssh with seccomp enabled?") This adds the "Seccomp" line to /proc/$pid/status. Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: James Morris <jmorris@namei.org> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/proc.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 74cb394e6888..12665ee7094a 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -181,6 +181,7 @@ read the file /proc/PID/status:
181 CapPrm: 0000000000000000 181 CapPrm: 0000000000000000
182 CapEff: 0000000000000000 182 CapEff: 0000000000000000
183 CapBnd: ffffffffffffffff 183 CapBnd: ffffffffffffffff
184 Seccomp: 0
184 voluntary_ctxt_switches: 0 185 voluntary_ctxt_switches: 0
185 nonvoluntary_ctxt_switches: 1 186 nonvoluntary_ctxt_switches: 1
186 187
@@ -237,6 +238,7 @@ Table 1-2: Contents of the status files (as of 2.6.30-rc7)
237 CapPrm bitmap of permitted capabilities 238 CapPrm bitmap of permitted capabilities
238 CapEff bitmap of effective capabilities 239 CapEff bitmap of effective capabilities
239 CapBnd bitmap of capabilities bounding set 240 CapBnd bitmap of capabilities bounding set
241 Seccomp seccomp mode, like prctl(PR_GET_SECCOMP, ...)
240 Cpus_allowed mask of CPUs on which this process may run 242 Cpus_allowed mask of CPUs on which this process may run
241 Cpus_allowed_list Same as previous, but in "list format" 243 Cpus_allowed_list Same as previous, but in "list format"
242 Mems_allowed mask of memory nodes allowed to this process 244 Mems_allowed mask of memory nodes allowed to this process