diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -112,8 +112,6 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); -/* Linux 3.17: */ -DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); /* Linux 3.19: */ diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -153,6 +153,9 @@ /* Linux syslog flags */ #define LINUX_SYSLOG_ACTION_READ_ALL 3 +/* Linux seccomp flags */ +#define LINUX_SECCOMP_GET_ACTION_AVAIL 2 + #if defined(__aarch64__) || (defined(__amd64__) && !defined(COMPAT_LINUX32)) int linux_ptrace_status(struct thread *td, int pid, int status); #endif diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -2880,3 +2880,19 @@ tsp, NULL, 0)); } #endif /* __i386__ || __amd64__ */ + +int +linux_seccomp(struct thread *td, struct linux_seccomp_args *args) +{ + + switch (args->op) { + case LINUX_SECCOMP_GET_ACTION_AVAIL: + return (EOPNOTSUPP); + default: + /* + * Ignore unknown operations, just like Linux kernel built + * without CONFIG_SECCOMP. + */ + return (EINVAL); + } +}