958e1b
From 2b34fb6fdd65055bb38f53312542a1ea7ecbed2e Mon Sep 17 00:00:00 2001
958e1b
From: Paul Moore <pmoore@redhat.com>
958e1b
Date: Thu, 11 Sep 2014 03:16:56 +0200
958e1b
Subject: [PATCH 1/6] seccomp: add semctl() to the syscall whitelist
958e1b
958e1b
Message-id: <20140911031656.11035.52808.stgit@localhost>
958e1b
Patchwork-id: 60971
958e1b
O-Subject: [RHEL7 qemu-kvm PATCH] seccomp: add semctl() to the syscall whitelist
958e1b
Bugzilla: 1026314
958e1b
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
958e1b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
958e1b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
958e1b
958e1b
	commit b22876cc2f863c58cfebd4a5301fc47e8ec89228
958e1b
	Author: Paul Moore <pmoore@redhat.com>
958e1b
	Date:   Thu Aug 14 13:19:32 2014 -0400
958e1b
958e1b
	seccomp: add semctl() to the syscall whitelist
958e1b
958e1b
	QEMU needs to call semctl() for correct operation.  This particular
958e1b
	problem was identified on shutdown with the following commandline:
958e1b
958e1b
	# qemu -sandbox on -monitor stdio \
958e1b
	-device intel-hda -device hda-duplex -vnc :0
958e1b
958e1b
	Signed-off-by: Paul Moore <pmoore@redhat.com>
958e1b
	Signed-off-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
958e1b
958e1b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
958e1b
---
958e1b
 qemu-seccomp.c | 3 ++-
958e1b
 1 file changed, 2 insertions(+), 1 deletion(-)
958e1b
958e1b
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
958e1b
index cca1070..59cae8e 100644
958e1b
--- a/qemu-seccomp.c
958e1b
+++ b/qemu-seccomp.c
958e1b
@@ -245,7 +245,8 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
958e1b
     { SCMP_SYS(shmdt), 240 },
958e1b
     { SCMP_SYS(shmctl), 240 },
958e1b
     { SCMP_SYS(mlock), 240 },
958e1b
-    { SCMP_SYS(munlock), 240 }
958e1b
+    { SCMP_SYS(munlock), 240 },
958e1b
+    { SCMP_SYS(semctl), 240 }
958e1b
 };
958e1b
 
958e1b
 int seccomp_start(void)
958e1b
-- 
958e1b
1.8.3.1
958e1b