cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
958e1b
From 06d87c5605ba8229f2a3a0f257621bcf6e8c4330 Mon Sep 17 00:00:00 2001
958e1b
From: Paul Moore <pmoore@redhat.com>
958e1b
Date: Wed, 30 Apr 2014 19:54:46 +0200
958e1b
Subject: [PATCH 03/13] seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist
958e1b
958e1b
RH-Author: Paul Moore <pmoore@redhat.com>
958e1b
Message-id: <20140430195446.13069.14348.stgit@localhost>
958e1b
Patchwork-id: 58635
958e1b
O-Subject: [RHEL7 qemu-kvm PATCH] seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist
958e1b
Bugzilla: 1026314
958e1b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
958e1b
RH-Acked-by: Bandan Das <bsd@redhat.com>
958e1b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
958e1b
958e1b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1026314
958e1b
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=7405978
958e1b
Upstream: Upstream, see commit ID below
958e1b
Testing: Tested, see BZ
958e1b
958e1b
Minor differences from upstream patch due to a slowly diverging
958e1b
codebase.
958e1b
958e1b
	commit e3f9bb011ae24a594310fa4917754945dc832f8f
958e1b
	Author: Paul Moore <pmoore@redhat.com>
958e1b
	Date:   Wed Feb 26 10:25:01 2014 -0500
958e1b
958e1b
	seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist
958e1b
958e1b
	Additional testing reveals that PulseAudio requires shmctl() and the
958e1b
	mlock()/munlock() syscalls on some systems/configurations.  As before,
958e1b
	on systems that do require these syscalls, the problem can be seen with
958e1b
	the following command line:
958e1b
958e1b
	# qemu -monitor stdio  -sandbox on \
958e1b
		-device intel-hda -device hda-duplex
958e1b
958e1b
	Signed-off-by: Paul Moore <pmoore@redhat.com>
958e1b
	Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
958e1b
---
958e1b
 qemu-seccomp.c |    5 ++++-
958e1b
 1 file changed, 4 insertions(+), 1 deletion(-)
958e1b
958e1b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
958e1b
---
958e1b
 qemu-seccomp.c |    5 ++++-
958e1b
 1 files changed, 4 insertions(+), 1 deletions(-)
958e1b
958e1b
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
958e1b
index 3a2fbed..cca1070 100644
958e1b
--- a/qemu-seccomp.c
958e1b
+++ b/qemu-seccomp.c
958e1b
@@ -242,7 +242,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
958e1b
     { SCMP_SYS(fchmod), 240 },
958e1b
     { SCMP_SYS(shmget), 240 },
958e1b
     { SCMP_SYS(shmat), 240 },
958e1b
-    { SCMP_SYS(shmdt), 240 }
958e1b
+    { SCMP_SYS(shmdt), 240 },
958e1b
+    { SCMP_SYS(shmctl), 240 },
958e1b
+    { SCMP_SYS(mlock), 240 },
958e1b
+    { SCMP_SYS(munlock), 240 }
958e1b
 };
958e1b
 
958e1b
 int seccomp_start(void)
958e1b
-- 
958e1b
1.7.1
958e1b