Revert "CHROMIUM: seccomp_filter: add process state reporting"
authorLeann Ogasawara <leann.ogasawara@canonical.com>
Fri, 27 Jan 2012 19:56:03 +0000 (11:56 -0800)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 2 Apr 2012 20:18:53 +0000 (13:18 -0700)
This reverts commit 8932868c7fadcd42fdb0a67789023c2c9313dc08.

https://lists.ubuntu.com/archives/kernel-team/2012-January/018695.html

"At this point, since there are no consumers of the old API, and it
will be almost certainly replaced by the BPF API, I think in the face
of the 5-year support of the LTS release, we should probably just
remove all of the seccomp_filter patches from Ubuntu." - Kees Cook

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

fs/proc/base.c

index d66e9f0..6ad4671 100644 (file)
@@ -73,7 +73,6 @@
 #include <linux/security.h>
 #include <linux/ptrace.h>
 #include <linux/tracehook.h>
-#include <linux/seccomp.h>
 #include <linux/cgroup.h>
 #include <linux/cpuset.h>
 #include <linux/audit.h>
@@ -530,30 +529,6 @@ static int proc_pid_syscall(struct task_struct *task, char *buffer)
 }
 #endif /* CONFIG_HAVE_ARCH_TRACEHOOK */
 
-/*
- * Print out the current seccomp filter set for the task.
- */
-#ifdef CONFIG_SECCOMP_FILTER
-int proc_pid_seccomp_filter_show(struct seq_file *m, struct pid_namespace *ns,
-                                struct pid *pid, struct task_struct *task)
-{
-       struct seccomp_filters *filters;
-
-       seq_printf(m, "Mode: %d\n", task->seccomp.mode);
-       /* Avoid allowing other processes to incur too much added contention by
-        * only acquiring a reference under the task-wide mutex.
-        */
-       if (mutex_lock_killable(&task->seccomp.filters_guard))
-               return -1;
-       filters = get_seccomp_filters(task->seccomp.filters);
-       mutex_unlock(&task->seccomp.filters_guard);
-
-       seccomp_show_filters(filters, m);
-       put_seccomp_filters(filters);
-       return 0;
-}
-#endif /* CONFIG_SECCOMP_FILTER */
-
 /************************************************************************/
 /*                       Here the fs part begins                        */
 /************************************************************************/
@@ -2741,9 +2716,6 @@ static const struct pid_entry tgid_base_stuff[] = {
 #ifdef CONFIG_HAVE_ARCH_TRACEHOOK
        INF("syscall",    S_IRUGO, proc_pid_syscall),
 #endif
-#ifdef CONFIG_SECCOMP_FILTER
-       ONE("seccomp_filter",     S_IRUGO, proc_pid_seccomp_filter_show),
-#endif
        INF("cmdline",    S_IRUGO, proc_pid_cmdline),
        ONE("stat",       S_IRUGO, proc_tgid_stat),
        ONE("statm",      S_IRUGO, proc_pid_statm),
@@ -3090,9 +3062,6 @@ static const struct pid_entry tid_base_stuff[] = {
 #ifdef CONFIG_HAVE_ARCH_TRACEHOOK
        INF("syscall",   S_IRUGO, proc_pid_syscall),
 #endif
-#ifdef CONFIG_SECCOMP_FILTER
-       ONE("seccomp_filter",     S_IRUGO, proc_pid_seccomp_filter_show),
-#endif
        INF("cmdline",   S_IRUGO, proc_pid_cmdline),
        ONE("stat",      S_IRUGO, proc_tid_stat),
        ONE("statm",     S_IRUGO, proc_pid_statm),