From patchwork Wed Dec 17 20:50:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Moore X-Patchwork-Id: 422364 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 B92661400E9 for ; Thu, 18 Dec 2014 07:50:52 +1100 (AEDT) Received: from localhost ([::1]:51487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1LYX-0005qx-6a for incoming@patchwork.ozlabs.org; Wed, 17 Dec 2014 15:50:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1LY2-0005ZN-M9 for qemu-devel@nongnu.org; Wed, 17 Dec 2014 15:50:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1LXw-0000a6-EU for qemu-devel@nongnu.org; Wed, 17 Dec 2014 15:50:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1LXw-0000a0-6K for qemu-devel@nongnu.org; Wed, 17 Dec 2014 15:50:12 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBHKoAeX006633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 Dec 2014 15:50:10 -0500 Received: from [127.0.0.1] (vpn-63-34.rdu2.redhat.com [10.10.63.34]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBHKo9Aq002844; Wed, 17 Dec 2014 15:50:09 -0500 From: Paul Moore To: qemu-devel@nongnu.org, eduardo.otubo@profitbricks.com Date: Wed, 17 Dec 2014 15:50:09 -0500 Message-ID: <20141217205009.28322.63696.stgit@localhost> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com Subject: [Qemu-devel] [PATCH] seccomp: add mbind() 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 The "memory-backend-ram" QOM object utilizes the mbind(2) syscall to set the policy for a memory range. Add the syscall to the seccomp sandbox whitelist. Signed-off-by: Paul Moore Tested-by: Eduardo Habkost Reviewed-by: Eduardo Habkost Acked-by: Eduardo Otubo --- qemu-seccomp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index af6a375..b0c6269 100644 --- a/qemu-seccomp.c +++ b/qemu-seccomp.c @@ -235,7 +235,8 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(fallocate), 240 }, { SCMP_SYS(fadvise64), 240 }, { SCMP_SYS(inotify_init1), 240 }, - { SCMP_SYS(inotify_add_watch), 240 } + { SCMP_SYS(inotify_add_watch), 240 }, + { SCMP_SYS(mbind), 240 } }; int seccomp_start(void)