History

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.

Kees Cook committed 6 years ago

Commit c818c031 parent e4d05024 files · +10 −0Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/seccomp.h+2−0
@@ -13,6 +13,7 @@ · 12 unmodified lines
13#ifdef CONFIG_SECCOMP13#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
18struct seccomp_filter;19struct seccomp_filter;
@@ -29,6 +30,7 @@ struct seccomp_filter; · 10 unmodified lines
29 */30 */
30struct seccomp {31struct 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