diff options
author | Kees Cook <keescook@chromium.org> | 2020-05-14 00:11:26 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2020-07-11 02:01:51 +0300 |
commit | c818c03b661cd769e035e41673d5543ba2ebda64 (patch) | |
tree | ceb9cf9666ce0e0e3964c1ff1a0a5949de471cf6 /include/linux/seccomp.h | |
parent | e4d05028a07f505a08802a6d1b11674c149df2b3 (diff) | |
download | linux-c818c03b661cd769e035e41673d5543ba2ebda64.tar.xz |
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 'include/linux/seccomp.h')
-rw-r--r-- | include/linux/seccomp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 4192369b8418..2ec2720f83cc 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -13,6 +13,7 @@ #ifdef CONFIG_SECCOMP #include <linux/thread_info.h> +#include <linux/atomic.h> #include <asm/seccomp.h> struct seccomp_filter; @@ -29,6 +30,7 @@ struct seccomp_filter; */ struct seccomp { int mode; + atomic_t filter_count; struct seccomp_filter *filter; }; |