From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Paul Moore <pmoore@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
Eduardo Otubo <otubo@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 3/4] Adding seccomp calls to vl.c (v8)
Date: Wed, 15 Aug 2012 17:44:41 -0500 [thread overview]
Message-ID: <1345070682-8675-4-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1345070682-8675-1-git-send-email-aliguori@us.ibm.com>
From: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
v1:
- Full seccomp calls and data included in vl.c
v1 -> v2:
- Full seccomp calls and data removed from vl.c and put into separate
qemu-seccomp.[ch] file.
---
vl.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/vl.c b/vl.c
index d01256a..1010248 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>
@@ -2344,6 +2349,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.5.4
next prev parent reply other threads:[~2012-08-15 22:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 22:44 [Qemu-devel] [PATCH 0/4] Add -sandbox option to enable seccomp mode 2 Anthony Liguori
2012-08-15 22:44 ` [Qemu-devel] [PATCH 1/4] Adding support for libseccomp in configure and Makefile (v8) Anthony Liguori
2012-08-15 22:44 ` [Qemu-devel] [PATCH 2/4] Adding qemu-seccomp.[ch] (v8) Anthony Liguori
2012-08-15 22:44 ` Anthony Liguori [this message]
2012-08-15 22:44 ` [Qemu-devel] [PATCH 4/4] Command line support for seccomp with -sandbox (v8) Anthony Liguori
2012-08-16 14:45 ` [Qemu-devel] [PATCH 0/4] Add -sandbox option to enable seccomp mode 2 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=1345070682-8675-4-git-send-email-aliguori@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=otubo@linux.vnet.ibm.com \
--cc=pmoore@redhat.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).