[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/04] configure: arm/aarch64: allow enable-seccomp
From: |
Eduardo Otubo |
Subject: |
[Qemu-devel] [PULL 02/04] configure: arm/aarch64: allow enable-seccomp |
Date: |
Wed, 14 Oct 2015 11:38:24 +0200 |
From: Andrew Jones <address@hidden>
This is a revert of ae6e8ef11e6cb, but with a bit of refactoring,
and also specifically adding arm/aarch64, rather than all
architectures. Currently, libseccomp code appears to also support
mips, ppc, and s390. We could therefore allow qemu to enable
seccomp for those platforms as well, with additional configure
patches, given they're tested and proven to work.
Signed-off-by: Andrew Jones <address@hidden>
Acked-by: Eduardo Otubo <address@hidden>
---
configure | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index f08327e..7d5aab2 100755
--- a/configure
+++ b/configure
@@ -1876,16 +1876,34 @@ fi
# libseccomp check
if test "$seccomp" != "no" ; then
- if test "$cpu" = "i386" || test "$cpu" = "x86_64" &&
- $pkg_config --atleast-version=2.1.1 libseccomp; then
+ case "$cpu" in
+ i386|x86_64)
+ libseccomp_minver="2.1.1"
+ ;;
+ arm|aarch64)
+ libseccomp_minver="2.2.3"
+ ;;
+ *)
+ libseccomp_minver=""
+ ;;
+ esac
+
+ if test "$libseccomp_minver" != "" &&
+ $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then
libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`"
QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`"
- seccomp="yes"
+ seccomp="yes"
else
- if test "$seccomp" = "yes"; then
- feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.1"
- fi
- seccomp="no"
+ if test "$seccomp" = "yes" ; then
+ if test "$libseccomp_minver" != "" ; then
+ feature_not_found "libseccomp" \
+ "Install libseccomp devel >= $libseccomp_minver"
+ else
+ feature_not_found "libseccomp" \
+ "libseccomp is not supported for host cpu $cpu"
+ fi
+ fi
+ seccomp="no"
fi
fi
##########################################
--
2.1.4
- [Qemu-devel] [PULL 00/04] seccomp branch queue, Eduardo Otubo, 2015/10/14
- [Qemu-devel] [PULL 00/04] seccomp branch queue, Eduardo Otubo, 2015/10/15
- [Qemu-devel] [PULL 01/04] libseccomp: add cacheflush to whitelist, Eduardo Otubo, 2015/10/15
- [Qemu-devel] [PULL 02/04] configure: arm/aarch64: allow enable-seccomp, Eduardo Otubo, 2015/10/15
- [Qemu-devel] [PULL 03/04] Add argument filters to the seccomp sandbox, Eduardo Otubo, 2015/10/15
- [Qemu-devel] [PULL 04/04] Add syscalls for -runas and -chroot to the seccomp sandbox, Eduardo Otubo, 2015/10/15
- Re: [Qemu-devel] [PULL 00/04] seccomp branch queue, Peter Maydell, 2015/10/16