From patchwork Wed Feb 26 15:25:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Moore X-Patchwork-Id: 324480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E00152C009E for ; Thu, 27 Feb 2014 02:25:59 +1100 (EST) Received: from localhost ([::1]:41308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIgMv-0005dt-0x for incoming@patchwork.ozlabs.org; Wed, 26 Feb 2014 10:25:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIgMG-0005XK-67 for qemu-devel@nongnu.org; Wed, 26 Feb 2014 10:25:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIgM9-0007mP-Kj for qemu-devel@nongnu.org; Wed, 26 Feb 2014 10:25:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIgM9-0007kK-DY for qemu-devel@nongnu.org; Wed, 26 Feb 2014 10:25:09 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1QFP2R8011152 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Feb 2014 10:25:04 -0500 Received: from [127.0.0.1] (vpn-52-235.rdu2.redhat.com [10.10.52.235]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s1QFP1m3017694; Wed, 26 Feb 2014 10:25:02 -0500 To: qemu-devel@nongnu.org, otubo@linux.vnet.ibm.com From: Paul Moore Date: Wed, 26 Feb 2014 10:25:01 -0500 Message-ID: <20140226152501.5062.42074.stgit@localhost> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Additional testing reveals that PulseAudio requires shmctl() and the mlock()/munlock() syscalls on some systems/configurations. As before, on systems that do require these syscalls, the problem can be seen with the following command line: # qemu -monitor stdio -sandbox on \ -device intel-hda -device hda-duplex Signed-off-by: Paul Moore --- qemu-seccomp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index caa926e..3db1e9b 100644 --- a/qemu-seccomp.c +++ b/qemu-seccomp.c @@ -225,7 +225,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(fchmod), 240 }, { SCMP_SYS(shmget), 240 }, { SCMP_SYS(shmat), 240 }, - { SCMP_SYS(shmdt), 240 } + { SCMP_SYS(shmdt), 240 }, + { SCMP_SYS(shmctl), 240 }, + { SCMP_SYS(mlock), 240 }, + { SCMP_SYS(munlock), 240 } }; int seccomp_start(void)