lkml.org 
[lkml]   [2012]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] proc: add "Seccomp" to status
On Wed, 31 Oct 2012 13:09:27 -0700
Kees Cook <keescook@chromium.org> wrote:

> Adds the seccomp mode to the /proc/$pid/status file so the state of
> seccomp can be externally examined.

There's no reason here for anyone to apply this patch to anything.
Presumably you see some value to our users - please share your thoughts
with us ;)

> --- a/fs/proc/array.c
> +++ b/fs/proc/array.c
> @@ -327,6 +327,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

hm, OK, cpuset_task_status_allowed() is a no-op if CONFIG_CPUSETS=n, so
there is precedent for fields vanishing with Kconfig changes.

> + seq_printf(m, "Seccomp:\t%d\n", p->seccomp.mode);

Get thee yon unto Documentation/filesystems/proc.txt!

> +#endif
> +}



\
 
 \ /
  Last update: 2012-11-01 01:21    [W:0.035 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site