Received: from eggs.gnu.org ([2001:4830:134:3::10]:39357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arVWy-0004hB-DQ for qemu-devel@nongnu.org; Sat, 16 Apr 2016 15:05:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arVWw-0006ff-CI for qemu-devel@nongnu.org; Sat, 16 Apr 2016 15:05:20 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:35186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arVWw-0006fa-5O for qemu-devel@nongnu.org; Sat, 16 Apr 2016 15:05:18 -0400 Received: by mail-wm0-x235.google.com with SMTP id a140so70628135wma.0 for ; Sat, 16 Apr 2016 12:05:18 -0700 (PDT) From: Eduardo Otubo Date: Sat, 16 Apr 2016 21:04:31 +0200 Message-Id: <1460833472-14855-3-git-send-email-eduardo.otubo@profitbricks.com> In-Reply-To: <1460833472-14855-1-git-send-email-eduardo.otubo@profitbricks.com> References: <1460833472-14855-1-git-send-email-eduardo.otubo@profitbricks.com> Subject: [Qemu-devel] [PULL 02/03] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, James Hogan From: James Hogan The cacheflush system call (found on MIPS and ARM) has been included in the libseccomp header since 2.2.0, so include it back to that version. Previously it was only enabled since 2.2.3 since that is when it was enabled properly for ARM. This will allow seccomp support to be enabled for MIPS back to libseccomp 2.2.0. Signed-off-by: James Hogan Reviewed-By: Andrew Jones Acked-by: Eduardo Otubo --- qemu-seccomp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index 2866e3c..138ee02 100644 --- a/qemu-seccomp.c +++ b/qemu-seccomp.c @@ -16,11 +16,13 @@ #include #include "sysemu/seccomp.h" +/* For some architectures (notably ARM) cacheflush is not supported until + * libseccomp 2.2.3, but configure enforces that we are using a more recent + * version on those hosts, so it is OK for this check to be less strict. + */ #if SCMP_VER_MAJOR >= 3 #define HAVE_CACHEFLUSH -#elif SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR >= 3 - #define HAVE_CACHEFLUSH -#elif SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR == 2 && SCMP_VER_MICRO >= 3 +#elif SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR >= 2 #define HAVE_CACHEFLUSH #endif -- 2.1.4