* [Qemu-devel] [PATCH] configure: arm/aarch64: allow enable-seccomp
@ 2015-09-30 15:59 Andrew Jones
2015-10-02 14:02 ` Eduardo Otubo
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Jones @ 2015-09-30 15:59 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, eduardo.otubo
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 <drjones@redhat.com>
---
Depends on
http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg00191.html
configure | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index f14454e691b36..2d993bf210b56 100755
--- a/configure
+++ b/configure
@@ -1870,16 +1870,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.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: arm/aarch64: allow enable-seccomp
2015-09-30 15:59 [Qemu-devel] [PATCH] configure: arm/aarch64: allow enable-seccomp Andrew Jones
@ 2015-10-02 14:02 ` Eduardo Otubo
2015-10-02 14:23 ` Andrew Jones
0 siblings, 1 reply; 3+ messages in thread
From: Eduardo Otubo @ 2015-10-02 14:02 UTC (permalink / raw)
To: Andrew Jones; +Cc: peter.maydell, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 2627 bytes --]
On Wed, Sep 30, 2015 at 11=59=18AM -0400, Andrew Jones wrote:
> 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 <drjones@redhat.com>
> ---
> Depends on
> http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg00191.html
>
> configure | 32 +++++++++++++++++++++++++-------
> 1 file changed, 25 insertions(+), 7 deletions(-)
>
> diff --git a/configure b/configure
> index f14454e691b36..2d993bf210b56 100755
> --- a/configure
> +++ b/configure
> @@ -1870,16 +1870,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.5.2
>
The patch does look good, but I'll just delay a little bit the pull
request due to more patches incoming. I just want to create a single
batch. Is ok if we just merge it mid or end of next week?
Thanks for the contribution.
Acked-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
--
Eduardo Otubo
ProfitBricks GmbH
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: arm/aarch64: allow enable-seccomp
2015-10-02 14:02 ` Eduardo Otubo
@ 2015-10-02 14:23 ` Andrew Jones
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Jones @ 2015-10-02 14:23 UTC (permalink / raw)
To: qemu-devel, peter.maydell
On Fri, Oct 02, 2015 at 04:02:12PM +0200, Eduardo Otubo wrote:
> On Wed, Sep 30, 2015 at 11=59=18AM -0400, Andrew Jones wrote:
> > 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 <drjones@redhat.com>
> > ---
> > Depends on
> > http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg00191.html
> >
> > configure | 32 +++++++++++++++++++++++++-------
> > 1 file changed, 25 insertions(+), 7 deletions(-)
> >
> > diff --git a/configure b/configure
> > index f14454e691b36..2d993bf210b56 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1870,16 +1870,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.5.2
> >
>
> The patch does look good, but I'll just delay a little bit the pull
> request due to more patches incoming. I just want to create a single
> batch. Is ok if we just merge it mid or end of next week?
Works for me!
Thanks,
drew
>
> Thanks for the contribution.
>
> Acked-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
>
> --
> Eduardo Otubo
> ProfitBricks GmbH
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-02 14:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 15:59 [Qemu-devel] [PATCH] configure: arm/aarch64: allow enable-seccomp Andrew Jones
2015-10-02 14:02 ` Eduardo Otubo
2015-10-02 14:23 ` Andrew Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).