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.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -13,6 +13,7 @@ · 12 unmodified lines | |||
| 13 | #ifdef CONFIG_SECCOMP | 13 | #ifdef CONFIG_SECCOMP |
| 14 | 14 | ||
| 15 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
| 16 | #include <linux/atomic.h> | ||
| 16 | #include <asm/seccomp.h> | 17 | #include <asm/seccomp.h> |
| 17 | 18 | ||
| 18 | struct seccomp_filter; | 19 | struct seccomp_filter; |
| @@ -29,6 +30,7 @@ struct seccomp_filter; · 10 unmodified lines | |||
| 29 | */ | 30 | */ |
| 30 | struct seccomp { | 31 | struct seccomp { |
| 31 | int mode; | 32 | int mode; |
| 33 | atomic_t filter_count; | ||
| 32 | struct seccomp_filter *filter; | 34 | struct seccomp_filter *filter; |
| 33 | }; | 35 | }; |
| 34 | 36 | ||