From 9c43069bc75159303684231dd012c53763a1480a Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 17 Dec 2012 16:03:14 -0800 Subject: [PATCH] --- yaml --- r: 346459 b: refs/heads/master c: 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816 h: refs/heads/master i: 346457: 29f43142f933f5158e1ea08ff4c38cc6013736d2 346455: 51251affff3c98e9bbf6b018a16bf9675ad8fdc5 v: v3 --- [refs] | 2 +- trunk/Documentation/filesystems/proc.txt | 2 ++ trunk/fs/proc/array.c | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 155ce627e09e..245d0916d6c4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 834f82e2aa9a8ede94b17b656329f850c1471514 +refs/heads/master: 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816 diff --git a/trunk/Documentation/filesystems/proc.txt b/trunk/Documentation/filesystems/proc.txt index 74cb394e6888..12665ee7094a 100644 --- a/trunk/Documentation/filesystems/proc.txt +++ b/trunk/Documentation/filesystems/proc.txt @@ -181,6 +181,7 @@ read the file /proc/PID/status: CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: ffffffffffffffff + Seccomp: 0 voluntary_ctxt_switches: 0 nonvoluntary_ctxt_switches: 1 @@ -237,6 +238,7 @@ Table 1-2: Contents of the status files (as of 2.6.30-rc7) CapPrm bitmap of permitted capabilities CapEff bitmap of effective capabilities CapBnd bitmap of capabilities bounding set + Seccomp seccomp mode, like prctl(PR_GET_SECCOMP, ...) 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 diff --git a/trunk/fs/proc/array.c b/trunk/fs/proc/array.c index 377a37366dde..077235ffb38b 100644 --- a/trunk/fs/proc/array.c +++ b/trunk/fs/proc/array.c @@ -336,6 +336,13 @@ static inline void task_cap(struct seq_file *m, struct task_struct *p) render_cap_t(m, "CapBnd:\t", &cap_bset); } +static inline void task_seccomp(struct seq_file *m, struct task_struct *p) +{ +#ifdef CONFIG_SECCOMP + seq_printf(m, "Seccomp:\t%d\n", p->seccomp.mode); +#endif +} + static inline void task_context_switch_counts(struct seq_file *m, struct task_struct *p) { @@ -369,6 +376,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, } task_sig(m, task); task_cap(m, task); + task_seccomp(m, task); task_cpus_allowed(m, task); cpuset_task_status_allowed(m, task); task_context_switch_counts(m, task);