From: Zbigniew Jędrzejewski-Szmek Date: Tue, 14 Feb 2017 10:27:40 +0000 (-0500) Subject: Define clone order on ppc (#5325) X-Git-Tag: v233~99 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=290f0ff9aa4fa184de6810344415959e0b466cdb;p=thirdparty%2Fsystemd.git Define clone order on ppc (#5325) This was tested on ppc64le. Assume the same is true for ppc64. --- diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c index 84964f750f6..2631856563c 100644 --- a/src/shared/seccomp-util.c +++ b/src/shared/seccomp-util.c @@ -802,6 +802,8 @@ int seccomp_restrict_namespaces(unsigned long retain) { case SCMP_ARCH_X86_64: case SCMP_ARCH_X86: case SCMP_ARCH_X32: + case SCMP_ARCH_PPC64: + case SCMP_ARCH_PPC64LE: clone_reversed_order = 0; break; @@ -813,8 +815,8 @@ int seccomp_restrict_namespaces(unsigned long retain) { /* Please add more definitions here, if you port systemd to other architectures! */ -#if !defined(__i386__) && !defined(__x86_64__) && !defined(__s390__) && !defined(__s390x__) -#warning "Consider adding the right clone() syscall definitions here!" +#if SECCOMP_RESTRICT_NAMESPACES_BROKEN +# warning "Consider adding the right clone() syscall definitions here!" #endif } diff --git a/src/shared/seccomp-util.h b/src/shared/seccomp-util.h index 61f94de638d..b56ac3f7630 100644 --- a/src/shared/seccomp-util.h +++ b/src/shared/seccomp-util.h @@ -92,7 +92,7 @@ int seccomp_memory_deny_write_execute(void); #endif /* we don't know the right order of the clone() parameters except for these archs, for now */ -#if defined(__x86_64__) || defined(__i386__) || defined(__s390x__) || defined(__s390__) +#if defined(__x86_64__) || defined(__i386__) || defined(__s390x__) || defined(__s390__) || defined(__powerpc64__) #define SECCOMP_RESTRICT_NAMESPACES_BROKEN 0 #else #define SECCOMP_RESTRICT_NAMESPACES_BROKEN 1