diff options
Diffstat (limited to 'recipes-security/libseccomp/files/0003-tools-add-ppc64-support.patch')
-rw-r--r-- | recipes-security/libseccomp/files/0003-tools-add-ppc64-support.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/recipes-security/libseccomp/files/0003-tools-add-ppc64-support.patch b/recipes-security/libseccomp/files/0003-tools-add-ppc64-support.patch new file mode 100644 index 0000000..fa56192 --- /dev/null +++ b/recipes-security/libseccomp/files/0003-tools-add-ppc64-support.patch | |||
@@ -0,0 +1,80 @@ | |||
1 | From 21e74cf80be3d55fdfa5600bc99f284b19f75b01 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Moore <pmoore@redhat.com> | ||
3 | Date: Fri, 26 Sep 2014 12:50:40 -0400 | ||
4 | Subject: [PATCH 03/11] tools: add ppc64 support | ||
5 | |||
6 | Signed-off-by: Paul Moore <pmoore@redhat.com> | ||
7 | --- | ||
8 | tools/scmp_arch_detect.c | 6 ++++++ | ||
9 | tools/scmp_bpf_disasm.c | 4 ++++ | ||
10 | tools/scmp_bpf_sim.c | 4 ++++ | ||
11 | tools/util.c | 6 ++++++ | ||
12 | 4 files changed, 20 insertions(+) | ||
13 | |||
14 | diff --git a/tools/scmp_arch_detect.c b/tools/scmp_arch_detect.c | ||
15 | index 5a87252..d23d2ec 100644 | ||
16 | --- a/tools/scmp_arch_detect.c | ||
17 | +++ b/tools/scmp_arch_detect.c | ||
18 | @@ -99,6 +99,12 @@ int main(int argc, char *argv[]) | ||
19 | case SCMP_ARCH_MIPSEL64N32: | ||
20 | printf("mipsel64n32\n"); | ||
21 | break; | ||
22 | + case SCMP_ARCH_PPC64: | ||
23 | + printf("ppc64\n"); | ||
24 | + break; | ||
25 | + case SCMP_ARCH_PPC64LE: | ||
26 | + printf("ppc64le\n"); | ||
27 | + break; | ||
28 | default: | ||
29 | printf("unknown\n"); | ||
30 | } | ||
31 | diff --git a/tools/scmp_bpf_disasm.c b/tools/scmp_bpf_disasm.c | ||
32 | index 349b8a8..9199e17 100644 | ||
33 | --- a/tools/scmp_bpf_disasm.c | ||
34 | +++ b/tools/scmp_bpf_disasm.c | ||
35 | @@ -334,6 +334,10 @@ int main(int argc, char *argv[]) | ||
36 | arch = AUDIT_ARCH_MIPS64N32; | ||
37 | else if (strcmp(optarg, "mipsel64n32") == 0) | ||
38 | arch = AUDIT_ARCH_MIPSEL64N32; | ||
39 | + else if (strcmp(optarg, "ppc64") == 0) | ||
40 | + arch = AUDIT_ARCH_PPC64; | ||
41 | + else if (strcmp(optarg, "ppc64le") == 0) | ||
42 | + arch = AUDIT_ARCH_PPC64LE; | ||
43 | else | ||
44 | exit_usage(argv[0]); | ||
45 | break; | ||
46 | diff --git a/tools/scmp_bpf_sim.c b/tools/scmp_bpf_sim.c | ||
47 | index bb3a2e7..d3e439f 100644 | ||
48 | --- a/tools/scmp_bpf_sim.c | ||
49 | +++ b/tools/scmp_bpf_sim.c | ||
50 | @@ -249,6 +249,10 @@ int main(int argc, char *argv[]) | ||
51 | arch = AUDIT_ARCH_MIPS64N32; | ||
52 | else if (strcmp(optarg, "mipsel64n32") == 0) | ||
53 | arch = AUDIT_ARCH_MIPSEL64N32; | ||
54 | + else if (strcmp(optarg, "ppc64") == 0) | ||
55 | + arch = AUDIT_ARCH_PPC64; | ||
56 | + else if (strcmp(optarg, "ppc64le") == 0) | ||
57 | + arch = AUDIT_ARCH_PPC64LE; | ||
58 | else | ||
59 | exit_fault(EINVAL); | ||
60 | break; | ||
61 | diff --git a/tools/util.c b/tools/util.c | ||
62 | index 9b58bbb..f998009 100644 | ||
63 | --- a/tools/util.c | ||
64 | +++ b/tools/util.c | ||
65 | @@ -62,6 +62,12 @@ | ||
66 | #elif __MIPSEL__ | ||
67 | #define ARCH_NATIVE AUDIT_ARCH_MIPSEL64N32 | ||
68 | #endif /* _MIPS_SIM_NABI32 */ | ||
69 | +#elif __PPC64__ | ||
70 | +#ifdef __BIG_ENDIAN__ | ||
71 | +#define ARCH_NATIVE AUDIT_ARCH_PPC64 | ||
72 | +#else | ||
73 | +#define ARCH_NATIVE AUDIT_ARCH_PPC64LE | ||
74 | +#endif | ||
75 | #else | ||
76 | #error the simulator code needs to know about your machine type | ||
77 | #endif | ||
78 | -- | ||
79 | 2.3.5 | ||
80 | |||