Page MenuHomeFreeBSD

D33808.id101986.diff
No OneTemporary

D33808.id101986.diff

Index: sys/compat/linux/linux_dummy.c
===================================================================
--- sys/compat/linux/linux_dummy.c
+++ 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: */
Index: sys/compat/linux/linux_misc.h
===================================================================
--- sys/compat/linux/linux_misc.h
+++ 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
Index: sys/compat/linux/linux_misc.c
===================================================================
--- sys/compat/linux/linux_misc.c
+++ 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);
+ }
+}

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 25, 8:35 PM (6 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27260901
Default Alt Text
D33808.id101986.diff (1 KB)

Event Timeline