From patchwork Wed May 29 20:30:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Moore X-Patchwork-Id: 247399 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 58F5A2C0092 for ; Thu, 30 May 2013 06:31:16 +1000 (EST) Received: from localhost ([::1]:41440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhn1e-00033d-Jw for incoming@patchwork.ozlabs.org; Wed, 29 May 2013 16:31:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhn1G-00030B-1x for qemu-devel@nongnu.org; Wed, 29 May 2013 16:30:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uhn1B-0007Lo-7S for qemu-devel@nongnu.org; Wed, 29 May 2013 16:30:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhn1A-0007LO-SV for qemu-devel@nongnu.org; Wed, 29 May 2013 16:30:45 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4TKUEwr014221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 29 May 2013 16:30:21 -0400 Received: from [127.0.0.1] (vpn-50-26.rdu2.redhat.com [10.10.50.26]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4TKU24B019788; Wed, 29 May 2013 16:30:08 -0400 To: qemu-devel@nongnu.org From: Paul Moore Date: Wed, 29 May 2013 16:30:01 -0400 Message-ID: <20130529203001.20939.83322.stgit@localhost> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: coreyb@linux.vnet.ibm.com, otubo@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH] seccomp: add the asynchronous I/O syscalls to the 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 In order to enable the asynchronous I/O functionality when using the seccomp sandbox we need to add the associated syscalls to the whitelist. Signed-off-by: Paul Moore Reviewed-by: Corey Bryant --- qemu-seccomp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index 031da1d..ca123bf 100644 --- a/qemu-seccomp.c +++ b/qemu-seccomp.c @@ -87,6 +87,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(stat), 245 }, { SCMP_SYS(uname), 245 }, { SCMP_SYS(eventfd2), 245 }, + { SCMP_SYS(io_getevents), 245 }, { SCMP_SYS(dup), 245 }, { SCMP_SYS(dup2), 245 }, { SCMP_SYS(dup3), 245 }, @@ -229,7 +230,9 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(sendmmsg), 241 }, { SCMP_SYS(recvmmsg), 241 }, { SCMP_SYS(prlimit64), 241 }, - { SCMP_SYS(waitid), 241 } + { SCMP_SYS(waitid), 241 }, + { SCMP_SYS(io_setup), 241 }, + { SCMP_SYS(io_destroy), 241 } }; int seccomp_start(void)