summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/seccomp.h
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-08-05 17:04:01 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-08-05 17:04:01 -0300
commit57f0f512b273f60d52568b8c6b77e17f5636edc0 (patch)
tree5e910f0e82173f4ef4f51111366a3f1299037a7b /arch/mips/include/asm/seccomp.h
Initial import
Diffstat (limited to 'arch/mips/include/asm/seccomp.h')
-rw-r--r--arch/mips/include/asm/seccomp.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/mips/include/asm/seccomp.h b/arch/mips/include/asm/seccomp.h
new file mode 100644
index 000000000..1d8a2e2c7
--- /dev/null
+++ b/arch/mips/include/asm/seccomp.h
@@ -0,0 +1,29 @@
+#ifndef __ASM_SECCOMP_H
+
+#include <linux/unistd.h>
+
+/*
+ * Kludge alert:
+ *
+ * The generic seccomp code currently allows only a single compat ABI. Until
+ * this is fixed we priorize O32 as the compat ABI over N32.
+ */
+#ifdef CONFIG_MIPS32_O32
+
+#define __NR_seccomp_read_32 4003
+#define __NR_seccomp_write_32 4004
+#define __NR_seccomp_exit_32 4001
+#define __NR_seccomp_sigreturn_32 4193 /* rt_sigreturn */
+
+#elif defined(CONFIG_MIPS32_N32)
+
+#define __NR_seccomp_read_32 6000
+#define __NR_seccomp_write_32 6001
+#define __NR_seccomp_exit_32 6058
+#define __NR_seccomp_sigreturn_32 6211 /* rt_sigreturn */
+
+#endif /* CONFIG_MIPS32_O32 */
+
+#include <asm-generic/seccomp.h>
+
+#endif /* __ASM_SECCOMP_H */