aboutsummaryrefslogtreecommitdiff
path: root/qemu-seccomp.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-04-08 14:16:33 +0100
committerEduardo Otubo <eduardo.otubo@profitbricks.com>2016-04-16 20:27:41 +0200
commit81bed73b5395c4c17dee6efebd44dd34b8f40d99 (patch)
treeda57313da582c8af150780eab6bd32e417fff8ee /qemu-seccomp.c
parent5ce43972812e4d9473d5acfd1d12e52cb9778b2c (diff)
seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3
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>
Diffstat (limited to 'qemu-seccomp.c')
-rw-r--r--qemu-seccomp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 2866e3c2a6..138ee022a8 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -16,11 +16,13 @@
#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