From patchwork Tue Oct 23 05:55:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Otubo X-Patchwork-Id: 193357 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 4D1652C00A6 for ; Tue, 23 Oct 2012 16:56:03 +1100 (EST) Received: from localhost ([::1]:35962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQXT7-0005oS-GJ for incoming@patchwork.ozlabs.org; Tue, 23 Oct 2012 01:56:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQXSz-0005o8-4U for qemu-devel@nongnu.org; Tue, 23 Oct 2012 01:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQXSy-0002fb-04 for qemu-devel@nongnu.org; Tue, 23 Oct 2012 01:55:53 -0400 Received: from e24smtp05.br.ibm.com ([32.104.18.26]:46791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQXSx-0002fT-KV for qemu-devel@nongnu.org; Tue, 23 Oct 2012 01:55:51 -0400 Received: from /spool/local by e24smtp05.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 23 Oct 2012 03:55:48 -0200 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp05.br.ibm.com (10.172.0.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 23 Oct 2012 03:55:47 -0200 Received: from d24relay03.br.ibm.com (d24relay03.br.ibm.com [9.13.184.25]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id 97DE61DC001F for ; Tue, 23 Oct 2012 01:55:46 -0400 (EDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.8.31.93]) by d24relay03.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9N5tjO144302494 for ; Tue, 23 Oct 2012 03:55:45 -0200 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9N5tjqf028102 for ; Tue, 23 Oct 2012 03:55:45 -0200 Received: from vader.ibm.com.com ([9.8.12.31]) by d24av02.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q9N5tjpE028094; Tue, 23 Oct 2012 03:55:45 -0200 From: Eduardo Otubo To: qemu-devel@nongnu.org Date: Tue, 23 Oct 2012 03:55:29 -0200 Message-Id: <1350971732-16621-1-git-send-email-otubo@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.12 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12102305-2362-0000-0000-000008C2D70B X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 32.104.18.26 Cc: pmoore@redhat.com, aliguori@us.ibm.com, coreyb@linux.vnet.ibm.com, Eduardo Otubo Subject: [Qemu-devel] [PATCHv2 1/4] Adding new syscalls (bugzilla 855162) 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 According to the bug 855162[0] - there's the need of adding new syscalls to the whitelist whenn using Qemu with Libvirt. [0] - https://bugzilla.redhat.com/show_bug.cgi?id=855162 v2: Adding new syscalls to the list: readlink, rt_sigpending, and rt_sigtimedwait Reported-by: Paul Moore Signed-off-by: Eduardo Otubo --- qemu-seccomp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index 64329a3..a7b33e2 100644 --- a/qemu-seccomp.c +++ b/qemu-seccomp.c @@ -45,6 +45,13 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(access), 245 }, { SCMP_SYS(prctl), 245 }, { SCMP_SYS(signalfd), 245 }, + { SCMP_SYS(getrlimit), 245 }, + { SCMP_SYS(set_tid_address), 245 }, + { SCMP_SYS(socketpair), 245 }, + { SCMP_SYS(statfs), 245 }, + { SCMP_SYS(unlink), 245 }, + { SCMP_SYS(wait4), 245 }, + { SCMP_SYS(getuid), 245 }, #if defined(__i386__) { SCMP_SYS(fcntl64), 245 }, { SCMP_SYS(fstat64), 245 }, @@ -107,7 +114,11 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(getsockname), 242 }, { SCMP_SYS(getpeername), 242 }, { SCMP_SYS(fdatasync), 242 }, - { SCMP_SYS(close), 242 } + { SCMP_SYS(close), 242 }, + { SCMP_SYS(accept4), 242 }, + { SCMP_SYS(readlink), 242 }, + { SCMP_SYS(rt_sigpending), 242 }, + { SCMP_SYS(rt_sigtimedwait), 242 } }; int seccomp_start(void)