diff options
author | Kenta.Tada@sony.com <Kenta.Tada@sony.com> | 2021-03-21 16:52:19 +0100 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2021-03-31 07:33:50 +0200 |
commit | 64bdc0244054f7d4bb621c8b4455e292f4e421bc (patch) | |
tree | 689baf7210630c9e6bd14a912b1772bcfa2c6ec0 /fs/proc/array.c | |
parent | Linux 5.12-rc2 (diff) | |
download | linux-64bdc0244054f7d4bb621c8b4455e292f4e421bc.tar.xz linux-64bdc0244054f7d4bb621c8b4455e292f4e421bc.zip |
seccomp: Fix CONFIG tests for Seccomp_filters
Strictly speaking, seccomp filters are only used
when CONFIG_SECCOMP_FILTER.
This patch fixes the condition to enable "Seccomp_filters"
in /proc/$pid/status.
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
Fixes: c818c03b661c ("seccomp: Report number of loaded filters in /proc/$pid/status")
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/OSBPR01MB26772D245E2CF4F26B76A989F5669@OSBPR01MB2677.jpnprd01.prod.outlook.com
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index bb87e4d89cd8..7ec59171f197 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -342,9 +342,11 @@ static inline void task_seccomp(struct seq_file *m, struct task_struct *p) seq_put_decimal_ull(m, "NoNewPrivs:\t", task_no_new_privs(p)); #ifdef CONFIG_SECCOMP seq_put_decimal_ull(m, "\nSeccomp:\t", p->seccomp.mode); +#ifdef CONFIG_SECCOMP_FILTER seq_put_decimal_ull(m, "\nSeccomp_filters:\t", atomic_read(&p->seccomp.filter_count)); #endif +#endif seq_puts(m, "\nSpeculation_Store_Bypass:\t"); switch (arch_prctl_spec_ctrl_get(p, PR_SPEC_STORE_BYPASS)) { case -EINVAL: |