summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2016-05-25 16:53:39 +0200
committerPaul Moore <paul@paul-moore.com>2016-05-25 15:16:37 -0400
commitc86e1f565537b28b73ebd63f0239b4a446925534 (patch)
tree16e8c4d65d23de24771c19e7e47c701fd4266775 /tools
parent4371bf04c75780457b192e4defd2f8d4e5d61f27 (diff)
downloadlibseccomp-c86e1f565537b28b73ebd63f0239b4a446925534.tar.gz
arch: Add parisc architecture support
This patch (v4) adds support for the parisc and parisc64 architectures to libseccomp. I didn't split up the patch, because it's pretty trivial. Those parisc-specific files gets added: src/arch-parisc-syscalls.c src/arch-parisc.c src/arch-parisc.h src/arch-parisc64.c All other changes are trivial because they simply add parisc-specific case statements in variouse switch statements. I did ran a "make check" on x86-64 and parisc and all testcases succeeded. All live testcases succeed as well when running "./regression -T live". The patch applies cleanly to current libseccomp git head. Changes between v4 and v3 of this patch: - Added parisc arch to arch-syscall-check.c and fixup syscall table as needed - Fixed copyright notices in parisc files as suggested by Mike Frysinger Changes between v3 and v2 of this patch: - Stripped out patch which reports if a check was skipped because valgrind isn't installed. - Added tuxcall pseudo syscall for 19-sim-missing_syscalls testcase - Added sysmips pseudo syscall for 29-sim-pseudo_syscall testcase Changes between v2 and v1 of this patch: - Enabled seccomp mode 2 regression tests on parisc. Kernel support for hppa was added in kernel 4.6-rc1 and backported into the kernel v4.5.2 stable series. Signed-off-by: Helge Deller <deller@gmx.de> [PM: corrected a number or errors from 'make check-syntax'] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/scmp_arch_detect.c6
-rw-r--r--tools/scmp_bpf_sim.c4
-rw-r--r--tools/util.c4
3 files changed, 14 insertions, 0 deletions
diff --git a/tools/scmp_arch_detect.c b/tools/scmp_arch_detect.c
index 4b452d1..ad43f2d 100644
--- a/tools/scmp_arch_detect.c
+++ b/tools/scmp_arch_detect.c
@@ -99,6 +99,12 @@ int main(int argc, char *argv[])
case SCMP_ARCH_MIPSEL64N32:
printf("mipsel64n32\n");
break;
+ case SCMP_ARCH_PARISC:
+ printf("parisc\n");
+ break;
+ case SCMP_ARCH_PARISC64:
+ printf("parisc64\n");
+ break;
case SCMP_ARCH_PPC:
printf("ppc\n");
break;
diff --git a/tools/scmp_bpf_sim.c b/tools/scmp_bpf_sim.c
index a0cf6d1..3d3204a 100644
--- a/tools/scmp_bpf_sim.c
+++ b/tools/scmp_bpf_sim.c
@@ -265,6 +265,10 @@ int main(int argc, char *argv[])
arch = AUDIT_ARCH_MIPS64N32;
else if (strcmp(optarg, "mipsel64n32") == 0)
arch = AUDIT_ARCH_MIPSEL64N32;
+ else if (strcmp(optarg, "parisc") == 0)
+ arch = AUDIT_ARCH_PARISC;
+ else if (strcmp(optarg, "parisc64") == 0)
+ arch = AUDIT_ARCH_PARISC64;
else if (strcmp(optarg, "ppc") == 0)
arch = AUDIT_ARCH_PPC;
else if (strcmp(optarg, "ppc64") == 0)
diff --git a/tools/util.c b/tools/util.c
index cc48647..7122335 100644
--- a/tools/util.c
+++ b/tools/util.c
@@ -62,6 +62,10 @@
#elif __MIPSEL__
#define ARCH_NATIVE AUDIT_ARCH_MIPSEL64N32
#endif /* _MIPS_SIM_NABI32 */
+#elif __hppa64__
+#define ARCH_NATIVE AUDIT_ARCH_PARISC64
+#elif __hppa__
+#define ARCH_NATIVE AUDIT_ARCH_PARISC
#elif __PPC64__
#ifdef __BIG_ENDIAN__
#define ARCH_NATIVE AUDIT_ARCH_PPC64