]> git.proxmox.com Git - mirror_qemu.git/commitdiff
seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3
authorJames Hogan <james.hogan@imgtec.com>
Fri, 8 Apr 2016 13:16:33 +0000 (14:16 +0100)
committerEduardo Otubo <eduardo.otubo@profitbricks.com>
Sat, 16 Apr 2016 18:27:41 +0000 (20:27 +0200)
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 <james.hogan@imgtec.com>
Reviewed-By: Andrew Jones <drjones@redhat.com>
Acked-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
qemu-seccomp.c

index 2866e3c2a6605d8432d8e0156cd830fccdadaada..138ee022a8fe32f110cb19a7a4c9b099e7536466 100644 (file)
 #include <seccomp.h>
 #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