summaryrefslogtreecommitdiffstats
path: root/src/arch-s390.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:09:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:09:30 +0000
commit81749f1fe87e489c4e2e7408a0fae9370c3810b3 (patch)
tree2d1345a5762855b6577495d90ac134c4e92d7ff8 /src/arch-s390.c
parentInitial commit. (diff)
downloadlibseccomp-81749f1fe87e489c4e2e7408a0fae9370c3810b3.tar.xz
libseccomp-81749f1fe87e489c4e2e7408a0fae9370c3810b3.zip
Adding upstream version 2.5.5.upstream/2.5.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/arch-s390.c')
-rw-r--r--src/arch-s390.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/arch-s390.c b/src/arch-s390.c
new file mode 100644
index 0000000..cbcc769
--- /dev/null
+++ b/src/arch-s390.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2015 IBM
+ * Author: Jan Willeke <willeke@linux.vnet.com.com>
+ */
+
+#include <stdlib.h>
+#include <errno.h>
+#include <string.h>
+#include <linux/audit.h>
+
+#include "db.h"
+#include "syscalls.h"
+#include "arch.h"
+#include "arch-s390.h"
+
+/* s390 syscall numbers */
+#define __s390_NR_socketcall 102
+#define __s390_NR_ipc 117
+
+ARCH_DEF(s390)
+
+const struct arch_def arch_def_s390 = {
+ .token = SCMP_ARCH_S390,
+ .token_bpf = AUDIT_ARCH_S390,
+ .size = ARCH_SIZE_32,
+ .endian = ARCH_ENDIAN_BIG,
+ .sys_socketcall = __s390_NR_socketcall,
+ .sys_ipc = __s390_NR_ipc,
+ .syscall_resolve_name = abi_syscall_resolve_name_munge,
+ .syscall_resolve_name_raw = s390_syscall_resolve_name,
+ .syscall_resolve_num = abi_syscall_resolve_num_munge,
+ .syscall_resolve_num_raw = s390_syscall_resolve_num,
+ .syscall_rewrite = abi_syscall_rewrite,
+ .rule_add = abi_rule_add,
+};