From: Eduardo Otubo <otubo@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: pmoore@redhat.com, aliguori@us.ibm.com, wad@chromium.org,
coreyb@linux.vnet.ibm.com, blauwirbel@gmail.com,
Eduardo Otubo <otubo@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v6 3/3] Adding seccomp calls to vl.c
Date: Mon, 13 Aug 2012 16:01:08 -0300 [thread overview]
Message-ID: <1344884468-11065-4-git-send-email-otubo@linux.vnet.ibm.com> (raw)
In-Reply-To: <1344884468-11065-1-git-send-email-otubo@linux.vnet.ibm.com>
v1:
* Full seccomp calls and data included in vl.c
v2:
* Full seccomp calls and data removed from vl.c and put into separate
qemu-seccomp.[ch] file.
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
---
vl.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/vl.c b/vl.c
index 91076f0..2c62efc 100644
--- a/vl.c
+++ b/vl.c
@@ -63,6 +63,11 @@
#include <linux/ppdev.h>
#include <linux/parport.h>
#endif
+
+#ifdef CONFIG_SECCOMP
+#include "qemu-seccomp.h"
+#endif
+
#ifdef __sun__
#include <sys/stat.h>
#include <sys/ethernet.h>
@@ -2299,6 +2304,14 @@ int main(int argc, char **argv, char **envp)
const char *trace_events = NULL;
const char *trace_file = NULL;
+#ifdef CONFIG_SECCOMP
+ if (seccomp_start() < 0) {
+ fprintf(stderr,
+ "seccomp: failed to install syscall filter in the kernel\n");
+ exit(1);
+ }
+#endif
+
atexit(qemu_run_exit_notifiers);
error_set_progname(argv[0]);
--
1.7.1
next prev parent reply other threads:[~2012-08-13 19:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-13 19:01 [Qemu-devel] [PATCH v6 0/3] Sandboxing Qemu guests with Libseccomp Eduardo Otubo
2012-08-13 19:01 ` [Qemu-devel] [PATCH v6 1/3] Adding support for libseccomp in configure and Makefile Eduardo Otubo
2012-08-13 19:01 ` [Qemu-devel] [PATCH v6 2/3] Adding qemu-seccomp.[ch] Eduardo Otubo
2012-08-13 19:01 ` Eduardo Otubo [this message]
2012-08-13 19:25 ` [Qemu-devel] [PATCH v6 0/3] Sandboxing Qemu guests with Libseccomp Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2012-08-13 18:44 Eduardo Otubo
2012-08-13 18:44 ` [Qemu-devel] [PATCH v6 3/3] Adding seccomp calls to vl.c 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=1344884468-11065-4-git-send-email-otubo@linux.vnet.ibm.com \
--to=otubo@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=coreyb@linux.vnet.ibm.com \
--cc=pmoore@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wad@chromium.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).