SHA256
1
0
forked from pool/libseccomp

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
This commit is contained in:
Jan Engelhardt 2014-07-12 11:47:13 +00:00 committed by Git OBS Bridge
parent 76f82fad9e
commit 8d2780d7a1
3 changed files with 100 additions and 2 deletions

View File

@ -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()))

View File

@ -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

View File

@ -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