From 8d2780d7a1cf5c19d41c74350209c547b8566b5f192f1470e9c562ba1ab07e8a Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 12 Jul 2014 11:47:13 +0000 Subject: [PATCH] Accepting request 240751 from home:msmeissn:branches:security - updated ppc64le patch s390 32bit: passed: 3823 / failed: 91 / errored: 43 OBS-URL: https://build.opensuse.org/request/show/240751 OBS-URL: https://build.opensuse.org/package/show/security/libseccomp?expand=0&rev=22 --- libseccomp-s390x-support.patch | 90 +++++++++++++++++++++++++++++++++- libseccomp.changes | 7 +++ libseccomp.spec | 5 +- 3 files changed, 100 insertions(+), 2 deletions(-) diff --git a/libseccomp-s390x-support.patch b/libseccomp-s390x-support.patch index a4d718c..b2e6cf2 100644 --- a/libseccomp-s390x-support.patch +++ b/libseccomp-s390x-support.patch @@ -1191,7 +1191,7 @@ Index: libseccomp-2.1.1/src/arch-ppc64.c =================================================================== --- /dev/null +++ libseccomp-2.1.1/src/arch-ppc64.c -@@ -0,0 +1,34 @@ +@@ -0,0 +1,38 @@ +/** + * Enhanced Seccomp PowerPC64 Specific Code + * @@ -1224,7 +1224,11 @@ Index: libseccomp-2.1.1/src/arch-ppc64.c + .token = SCMP_ARCH_PPC64, + .token_bpf = AUDIT_ARCH_PPC64, + .size = ARCH_SIZE_64, ++#ifdef __LITTLE_ENDIAN__ ++ .endian = ARCH_ENDIAN_LITTLE, ++#else + .endian = ARCH_ENDIAN_BIG, ++#endif +}; Index: libseccomp-2.1.1/src/arch-ppc64.h =================================================================== @@ -2227,3 +2231,87 @@ Index: libseccomp-2.1.1/src/arch-ppc-syscalls.c + + return NULL; +} +Index: libseccomp-2.1.1/tools/scmp_sys_resolver.c +=================================================================== +--- libseccomp-2.1.1.orig/tools/scmp_sys_resolver.c ++++ libseccomp-2.1.1/tools/scmp_sys_resolver.c +@@ -31,6 +31,10 @@ + #include "../src/arch-x86_64.h" + #include "../src/arch-x32.h" + #include "../src/arch-arm.h" ++#include "../src/arch-ppc.h" ++#include "../src/arch-ppc64.h" ++#include "../src/arch-s390.h" ++#include "../src/arch-s390x.h" + + /** + * Print the usage information to stderr and exit +@@ -70,6 +74,14 @@ int main(int argc, char *argv[]) + arch = &arch_def_x32; + else if (strcmp(optarg, "arm") == 0) + arch = &arch_def_arm; ++ else if (strcmp(optarg, "ppc") == 0) ++ arch = &arch_def_ppc; ++ else if (strcmp(optarg, "ppc64") == 0) ++ arch = &arch_def_ppc64; ++ else if (strcmp(optarg, "s390") == 0) ++ arch = &arch_def_s390; ++ else if (strcmp(optarg, "s390x") == 0) ++ arch = &arch_def_s390x; + else + exit_usage(argv[0]); + break; +Index: libseccomp-2.1.1/tests/23-sim-arch_all_basic.c +=================================================================== +--- libseccomp-2.1.1.orig/tests/23-sim-arch_all_basic.c ++++ libseccomp-2.1.1/tests/23-sim-arch_all_basic.c +@@ -60,6 +60,30 @@ int main(int argc, char *argv[]) + goto out; + } + ++ if (seccomp_arch_exist(ctx, SCMP_ARCH_PPC)) { ++ rc = seccomp_arch_add(ctx, SCMP_ARCH_PPC); ++ if (rc != 0) ++ goto out; ++ } ++ ++ if (seccomp_arch_exist(ctx, SCMP_ARCH_PPC64)) { ++ rc = seccomp_arch_add(ctx, SCMP_ARCH_PPC64); ++ if (rc != 0) ++ goto out; ++ } ++ ++ if (seccomp_arch_exist(ctx, SCMP_ARCH_S390)) { ++ rc = seccomp_arch_add(ctx, SCMP_ARCH_S390); ++ if (rc != 0) ++ goto out; ++ } ++ ++ if (seccomp_arch_exist(ctx, SCMP_ARCH_S390X)) { ++ rc = seccomp_arch_add(ctx, SCMP_ARCH_S390X); ++ if (rc != 0) ++ goto out; ++ } ++ + rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(read), 1, + SCMP_A0(SCMP_CMP_EQ, STDIN_FILENO)); + if (rc != 0) +Index: libseccomp-2.1.1/tests/23-sim-arch_all_basic.py +=================================================================== +--- libseccomp-2.1.1.orig/tests/23-sim-arch_all_basic.py ++++ libseccomp-2.1.1/tests/23-sim-arch_all_basic.py +@@ -38,6 +38,14 @@ def test(args): + f.add_arch(Arch.X32) + if not f.exist_arch(Arch.ARM): + f.add_arch(Arch.ARM) ++ if not f.exist_arch(Arch.PPC): ++ f.add_arch(Arch.PPC) ++ if not f.exist_arch(Arch.PPC64): ++ f.add_arch(Arch.PPC64) ++ if not f.exist_arch(Arch.S390): ++ f.add_arch(Arch.S390) ++ if not f.exist_arch(Arch.S390X): ++ f.add_arch(Arch.S390X) + f.add_rule(ALLOW, "read", Arg(0, EQ, sys.stdin.fileno())) + f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stdout.fileno())) + f.add_rule(ALLOW, "write", Arg(0, EQ, sys.stderr.fileno())) diff --git a/libseccomp.changes b/libseccomp.changes index 75cc775..b9e21cb 100644 --- a/libseccomp.changes +++ b/libseccomp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 12 11:26:10 UTC 2014 - meissner@suse.com + +- updated ppc64le patch + ------------------------------------------------------------------- Wed Mar 5 15:13:35 UTC 2014 - meissner@suse.com @@ -7,6 +12,8 @@ Wed Mar 5 15:13:35 UTC 2014 - meissner@suse.com - disabled testsuite on the new platforms, as there are still some failures. + s390 32bit: passed: 3823 / failed: 91 / errored: 43 + s390x: passed: 2410 / failed: 879 / errored: 68 ppc64le: passed: 3914 / failed: 0 / errored: 43 diff --git a/libseccomp.spec b/libseccomp.spec index 181ac2f..389e84c 100644 --- a/libseccomp.spec +++ b/libseccomp.spec @@ -113,8 +113,11 @@ find "$b/%_libdir" -type f -name "*.la" -delete; %fdupes %buildroot/%_prefix %check -%ifarch ppc ppc64 ppc64le s390 s390x +%ifarch ppc ppc64 s390 s390x make check || true +#pushd tests/ +#./regression -v +#popd %else make check %endif