summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2020-03-23 14:49:09 -0400
committerPaul Moore <paul@paul-moore.com>2020-03-23 16:23:51 -0400
commit3e91da39fd6e647ed171b5f727d372be5b4feee7 (patch)
tree168c074d7cc30a5216777fdcdf0e32b2e6651cb7 /src
parent8c8b5cb12c4da769e7a25f720bec3bfbfb15d3f6 (diff)
downloadlibseccomp-3e91da39fd6e647ed171b5f727d372be5b4feee7.tar.gz
parisc64: separate parisc and parisc64
Previously parisc64 was borrowing from parsic which led to problems with the syscall table for parisc64. This patch properly splits the two ABIs. Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am3
-rw-r--r--src/arch-parisc.h1
-rw-r--r--src/arch-parisc64.c6
-rw-r--r--src/arch-parisc64.h29
-rw-r--r--src/arch-syscall-dump.c5
-rw-r--r--src/arch.c1
-rw-r--r--src/syscalls.c1
7 files changed, 40 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index bfe5e3d..8d8b97f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,7 +39,8 @@ SOURCES_ALL = \
arch-mips.h arch-mips.c \
arch-mips64.h arch-mips64.c \
arch-mips64n32.h arch-mips64n32.c \
- arch-parisc.h arch-parisc.c arch-parisc64.c \
+ arch-parisc.h arch-parisc.c \
+ arch-parisc64.h arch-parisc64.c \
arch-ppc.h arch-ppc.c \
arch-ppc64.h arch-ppc64.c \
arch-riscv64.h arch-riscv64.c \
diff --git a/src/arch-parisc.h b/src/arch-parisc.h
index d65169c..0a2df6a 100644
--- a/src/arch-parisc.h
+++ b/src/arch-parisc.h
@@ -25,6 +25,5 @@
#include "arch.h"
ARCH_DECL(parisc)
-ARCH_DECL(parisc64)
#endif
diff --git a/src/arch-parisc64.c b/src/arch-parisc64.c
index 2b63120..08e5081 100644
--- a/src/arch-parisc64.c
+++ b/src/arch-parisc64.c
@@ -8,15 +8,15 @@
#include <linux/audit.h>
#include "arch.h"
-#include "arch-parisc.h"
+#include "arch-parisc64.h"
const struct arch_def arch_def_parisc64 = {
.token = SCMP_ARCH_PARISC64,
.token_bpf = AUDIT_ARCH_PARISC64,
.size = ARCH_SIZE_64,
.endian = ARCH_ENDIAN_BIG,
- .syscall_resolve_name = parisc_syscall_resolve_name,
- .syscall_resolve_num = parisc_syscall_resolve_num,
+ .syscall_resolve_name = parisc64_syscall_resolve_name,
+ .syscall_resolve_num = parisc64_syscall_resolve_num,
.syscall_rewrite = NULL,
.rule_add = NULL,
};
diff --git a/src/arch-parisc64.h b/src/arch-parisc64.h
new file mode 100644
index 0000000..7ec889b
--- /dev/null
+++ b/src/arch-parisc64.h
@@ -0,0 +1,29 @@
+/**
+ * Enhanced Seccomp PARISC Specific Code
+ *
+ * Copyright (c) 2016 Helge Deller <deller@gmx.de>
+ *
+ */
+
+/*
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of version 2.1 of the GNU Lesser General Public License as
+ * published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, see <http://www.gnu.org/licenses>.
+ */
+
+#ifndef _ARCH_PARISC64_H
+#define _ARCH_PARISC64_H
+
+#include "arch.h"
+
+ARCH_DECL(parisc64)
+
+#endif
diff --git a/src/arch-syscall-dump.c b/src/arch-syscall-dump.c
index 7c267fc..2055d34 100644
--- a/src/arch-syscall-dump.c
+++ b/src/arch-syscall-dump.c
@@ -39,6 +39,7 @@
#include "arch-mips64n32.h"
#include "arch-aarch64.h"
#include "arch-parisc.h"
+#include "arch-parisc64.h"
#include "arch-ppc.h"
#include "arch-ppc64.h"
#include "arch-riscv64.h"
@@ -118,9 +119,11 @@ int main(int argc, char *argv[])
sys = mips64n32_syscall_iterate(iter);
break;
case SCMP_ARCH_PARISC:
- case SCMP_ARCH_PARISC64:
sys = parisc_syscall_iterate(iter);
break;
+ case SCMP_ARCH_PARISC64:
+ sys = parisc64_syscall_iterate(iter);
+ break;
case SCMP_ARCH_PPC:
sys = ppc_syscall_iterate(iter);
break;
diff --git a/src/arch.c b/src/arch.c
index 361afe7..5485eb8 100644
--- a/src/arch.c
+++ b/src/arch.c
@@ -39,6 +39,7 @@
#include "arch-mips64.h"
#include "arch-mips64n32.h"
#include "arch-parisc.h"
+#include "arch-parisc64.h"
#include "arch-ppc.h"
#include "arch-ppc64.h"
#include "arch-riscv64.h"
diff --git a/src/syscalls.c b/src/syscalls.c
index 7f813cd..9091fa9 100644
--- a/src/syscalls.c
+++ b/src/syscalls.c
@@ -46,6 +46,7 @@ ARCH_DEF(mips64n32)
ARCH_DEF(mips64)
ARCH_DEF(mips)
ARCH_DEF(parisc)
+ARCH_DEF(parisc64)
ARCH_DEF(ppc64)
ARCH_DEF(ppc)
ARCH_DEF(s390)