cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-seccomp-add-some-basic-shared-memory-syscalls-to-the.patch

0a122b
From 38a4a6fb83fc002980bda2b47662997181607579 Mon Sep 17 00:00:00 2001
0a122b
From: Paul Moore <pmoore@redhat.com>
0a122b
Date: Mon, 27 Jan 2014 21:43:17 +0100
0a122b
Subject: [PATCH 02/28] seccomp: add some basic shared memory syscalls to the whitelist
0a122b
0a122b
RH-Author: Paul Moore <pmoore@redhat.com>
0a122b
Message-id: <20140127214317.24608.67441.stgit@localhost>
0a122b
Patchwork-id: 56967
0a122b
O-Subject: [RHEL7 qemu-kvm PATCH 2/2] seccomp: add some basic shared memory syscalls to the whitelist
0a122b
Bugzilla: 1026314
0a122b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
0a122b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
RH-Acked-by: Juan Quintela <quintela@redhat.com>
0a122b
0a122b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1026314
0a122b
Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=6956172
0a122b
Upstream: upstream, see commit IDs
0a122b
Testing: tested, see BZ
0a122b
0a122b
	seccomp: add some basic shared memory syscalls to the whitelist
0a122b
0a122b
	PulseAudio requires the use of shared memory so add shmget(), shmat(),
0a122b
	and shmdt() to the syscall whitelist.
0a122b
0a122b
	Reported-by: xuhan@redhat.com
0a122b
	Signed-off-by: Paul Moore <pmoore@redhat.com>
0a122b
---
0a122b
 qemu-seccomp.c |    5 ++++-
0a122b
 1 file changed, 4 insertions(+), 1 deletion(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 qemu-seccomp.c |    5 ++++-
0a122b
 1 files changed, 4 insertions(+), 1 deletions(-)
0a122b
0a122b
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
0a122b
index 34a54e4..3a2fbed 100644
0a122b
--- a/qemu-seccomp.c
0a122b
+++ b/qemu-seccomp.c
0a122b
@@ -239,7 +239,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
0a122b
     { SCMP_SYS(io_destroy), 241 },
0a122b
     { SCMP_SYS(arch_prctl), 240 },
0a122b
     { SCMP_SYS(mkdir), 240 },
0a122b
-    { SCMP_SYS(fchmod), 240 }
0a122b
+    { SCMP_SYS(fchmod), 240 },
0a122b
+    { SCMP_SYS(shmget), 240 },
0a122b
+    { SCMP_SYS(shmat), 240 },
0a122b
+    { SCMP_SYS(shmdt), 240 }
0a122b
 };
0a122b
 
0a122b
 int seccomp_start(void)
0a122b
-- 
0a122b
1.7.1
0a122b