From: Eduardo Otubo <otubo@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/2] Adding support for libseccomp in configure and Makefile
Date: Thu, 21 Jun 2012 19:10:37 -0300 [thread overview]
Message-ID: <7ebf7ca64814d7536261614b75b79934447d19df.1340315275.git.otubo@linux.vnet.ibm.com> (raw)
In-Reply-To: <cover.1340315275.git.otubo@linux.vnet.ibm.com>
In-Reply-To: <cover.1340315275.git.otubo@linux.vnet.ibm.com>
Adding basic options to the configure script to use libseccomp or not.
The default is set to 'no'. If the flag --enable-libseccomp is used, the
script will check for its existence using pkg-config.
v2:
* As I removed all the code related to seccomp from vl.c, I created
qemu-seccomp.[ch].
* Also making the configure script to add the specific line to
Makefile.obj in order to compile with appropriate support to seccomp.
v3:
* Removing the line from Makefile.obj and adding it to Makefile.objs.
* Marking libseccomp default option to 'yes' in the configure script.
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
---
Makefile.objs | 4 ++++
configure | 23 +++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/Makefile.objs b/Makefile.objs
index 74110dd..c0620bf 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -95,6 +95,10 @@ common-obj-y += qemu-timer.o qemu-timer-common.o
common-obj-$(CONFIG_SLIRP) += slirp/
######################################################################
+# libseccomp
+common-obj-$(CONFIG_LIBSECCOMP) += qemu-seccomp.o
+
+######################################################################
# libuser
user-obj-y =
diff --git a/configure b/configure
index b68c0ca..ec5c66d 100755
--- a/configure
+++ b/configure
@@ -195,6 +195,7 @@ zlib="yes"
guest_agent="yes"
libiscsi=""
coroutine=""
+libseccomp="yes"
# parse CC options first
for opt do
@@ -824,6 +825,10 @@ for opt do
;;
--disable-guest-agent) guest_agent="no"
;;
+ --enable-libseccomp) libseccomp="yes"
+ ;;
+ --disable-libseccomp) libseccomp="no"
+ ;;
*) echo "ERROR: unknown option $opt"; show_help="yes"
;;
esac
@@ -1108,6 +1113,8 @@ echo " --disable-usb-redir disable usb network redirection support"
echo " --enable-usb-redir enable usb network redirection support"
echo " --disable-guest-agent disable building of the QEMU Guest Agent"
echo " --enable-guest-agent enable building of the QEMU Guest Agent"
+echo " --disable-libseccomp disable libseccomp support"
+echo " --enable-libseccomp enable libseccomp support"
echo " --with-coroutine=BACKEND coroutine backend. Supported options:"
echo " gthread, ucontext, sigaltstack, windows"
echo ""
@@ -1353,6 +1360,17 @@ EOF
fi
##########################################
+# libseccomp check
+
+if test "$libseccomp" = "yes" ; then
+ if $pkg_config libseccomp --modversion >/dev/null 2>&1; then
+ LIBS=`$pkg_config --libs libseccomp`
+ else
+ feature_not_found "libseccomp"
+ fi
+fi
+
+##########################################
# xen probe
if test "$xen" != "no" ; then
@@ -3036,6 +3054,7 @@ echo "usb net redir $usb_redir"
echo "OpenGL support $opengl"
echo "libiscsi support $libiscsi"
echo "build guest agent $guest_agent"
+echo "seccomp support $libseccomp"
echo "coroutine backend $coroutine_backend"
if test "$sdl_too_old" = "yes"; then
@@ -3337,6 +3356,10 @@ if test "$libiscsi" = "yes" ; then
echo "CONFIG_LIBISCSI=y" >> $config_host_mak
fi
+if test "$libseccomp" = "yes" ; then
+ echo "CONFIG_LIBSECCOMP=y" >> $config_host_mak
+fi
+
# XXX: suppress that
if [ "$bsd" = "yes" ] ; then
echo "CONFIG_BSD=y" >> $config_host_mak
--
1.7.9.5
next prev parent reply other threads:[~2012-06-21 22:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 22:10 [Qemu-devel] [PATCH 0/2] Sandboxing Qemu guests with Libseccomp Eduardo Otubo
2012-06-21 22:10 ` Eduardo Otubo [this message]
2012-06-21 22:10 ` [Qemu-devel] [PATCH 2/2] Creating qemu-seccomp.[ch] and adding call to vl.c Eduardo Otubo
2012-06-22 8:29 ` Stefan Hajnoczi
2012-06-24 6:08 ` Blue Swirl
2012-06-22 12:17 ` [Qemu-devel] [PATCH 0/2] Sandboxing Qemu guests with Libseccomp Eduardo Otubo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7ebf7ca64814d7536261614b75b79934447d19df.1340315275.git.otubo@linux.vnet.ibm.com \
--to=otubo@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).