diff options
author | Kees Cook <keescook@chromium.org> | 2020-05-13 23:11:26 +0200 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2020-07-11 01:01:51 +0200 |
commit | c818c03b661cd769e035e41673d5543ba2ebda64 (patch) | |
tree | ceb9cf9666ce0e0e3964c1ff1a0a5949de471cf6 /init | |
parent | selftests/seccomp: Set NNP for TSYNC ESRCH flag test (diff) | |
download | linux-c818c03b661cd769e035e41673d5543ba2ebda64.tar.xz linux-c818c03b661cd769e035e41673d5543ba2ebda64.zip |
seccomp: Report number of loaded filters in /proc/$pid/status
A common question asked when debugging seccomp filters is "how many
filters are attached to your process?" Provide a way to easily answer
this question through /proc/$pid/status with a "Seccomp_filters" line.
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/init_task.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/init/init_task.c b/init/init_task.c index 15089d15010a..a3eb3847e1f4 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -204,6 +204,9 @@ struct task_struct init_task #ifdef CONFIG_SECURITY .security = NULL, #endif +#ifdef CONFIG_SECCOMP + .seccomp = { .filter_count = ATOMIC_INIT(0) }, +#endif }; EXPORT_SYMBOL(init_task); |