diff options
author | Paul Moore <pmoore@redhat.com> | 2015-08-05 12:00:34 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2015-08-05 12:00:34 -0400 |
commit | 29753076fddfed772511c67887bed1f0621b32cf (patch) | |
tree | 2b9d96ff167aae8d3aff6667a8fba8445559f533 /tools | |
parent | 62c59aab8d72787c5055f704660a132a0b83386b (diff) | |
parent | 0843a460f72da50756432a021c387fe8a7ab0bd5 (diff) | |
download | libseccomp-29753076fddfed772511c67887bed1f0621b32cf.tar.gz |
Merge branch 'working-ppc64'
Mike Strosaker <strosake@linux.vnet.ibm.com> reports that the
working-ppc64 branch is working for both 'make check' and './regression
-T live'.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/scmp_arch_detect.c | 9 | ||||
-rw-r--r-- | tools/scmp_bpf_disasm.c | 6 | ||||
-rw-r--r-- | tools/scmp_bpf_sim.c | 6 | ||||
-rw-r--r-- | tools/util.c | 8 | ||||
-rw-r--r-- | tools/util.h | 9 |
5 files changed, 38 insertions, 0 deletions
diff --git a/tools/scmp_arch_detect.c b/tools/scmp_arch_detect.c index 5a87252..03644c6 100644 --- a/tools/scmp_arch_detect.c +++ b/tools/scmp_arch_detect.c @@ -99,6 +99,15 @@ int main(int argc, char *argv[]) case SCMP_ARCH_MIPSEL64N32: printf("mipsel64n32\n"); break; + case SCMP_ARCH_PPC64: + printf("ppc64\n"); + break; + case SCMP_ARCH_PPC64LE: + printf("ppc64le\n"); + break; + case SCMP_ARCH_PPC: + printf("ppc\n"); + break; default: printf("unknown\n"); } diff --git a/tools/scmp_bpf_disasm.c b/tools/scmp_bpf_disasm.c index 349b8a8..d773469 100644 --- a/tools/scmp_bpf_disasm.c +++ b/tools/scmp_bpf_disasm.c @@ -334,6 +334,12 @@ int main(int argc, char *argv[]) arch = AUDIT_ARCH_MIPS64N32; else if (strcmp(optarg, "mipsel64n32") == 0) arch = AUDIT_ARCH_MIPSEL64N32; + else if (strcmp(optarg, "ppc64") == 0) + arch = AUDIT_ARCH_PPC64; + else if (strcmp(optarg, "ppc64le") == 0) + arch = AUDIT_ARCH_PPC64LE; + else if (strcmp(optarg, "ppc") == 0) + arch = AUDIT_ARCH_PPC; else exit_usage(argv[0]); break; diff --git a/tools/scmp_bpf_sim.c b/tools/scmp_bpf_sim.c index bb3a2e7..a53b4fd 100644 --- a/tools/scmp_bpf_sim.c +++ b/tools/scmp_bpf_sim.c @@ -249,6 +249,12 @@ int main(int argc, char *argv[]) arch = AUDIT_ARCH_MIPS64N32; else if (strcmp(optarg, "mipsel64n32") == 0) arch = AUDIT_ARCH_MIPSEL64N32; + else if (strcmp(optarg, "ppc64") == 0) + arch = AUDIT_ARCH_PPC64; + else if (strcmp(optarg, "ppc64le") == 0) + arch = AUDIT_ARCH_PPC64LE; + else if (strcmp(optarg, "ppc") == 0) + arch = AUDIT_ARCH_PPC; else exit_fault(EINVAL); break; diff --git a/tools/util.c b/tools/util.c index 9b58bbb..b45de3b 100644 --- a/tools/util.c +++ b/tools/util.c @@ -62,6 +62,14 @@ #elif __MIPSEL__ #define ARCH_NATIVE AUDIT_ARCH_MIPSEL64N32 #endif /* _MIPS_SIM_NABI32 */ +#elif __PPC64__ +#ifdef __BIG_ENDIAN__ +#define ARCH_NATIVE AUDIT_ARCH_PPC64 +#else +#define ARCH_NATIVE AUDIT_ARCH_PPC64LE +#endif +#elif __PPC__ +#define ARCH_NATIVE AUDIT_ARCH_PPC #else #error the simulator code needs to know about your machine type #endif diff --git a/tools/util.h b/tools/util.h index 4ec3f91..2fed617 100644 --- a/tools/util.h +++ b/tools/util.h @@ -63,6 +63,15 @@ __AUDIT_ARCH_CONVENTION_MIPS64_N32) #endif +#ifndef AUDIT_ARCH_AARCH64 +/* AArch64 support for audit was merged in 3.17-rc1 */ +#define AUDIT_ARCH_AARCH64 (EM_AARCH64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) +#endif + +#ifndef AUDIT_ARCH_PPC64LE +#define AUDIT_ARCH_PPC64LE (EM_PPC64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) +#endif + extern uint32_t arch; void exit_usage(const char *program); |