From patchwork Mon Jan 5 17:23:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Otubo X-Patchwork-Id: 425393 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 593C314009B for ; Tue, 6 Jan 2015 04:24:38 +1100 (AEDT) Received: from localhost ([::1]:33273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8BOO-0005Pz-IX for incoming@patchwork.ozlabs.org; Mon, 05 Jan 2015 12:24:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8BNv-0004lA-UD for qemu-devel@nongnu.org; Mon, 05 Jan 2015 12:24:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8BNn-00051D-MD for qemu-devel@nongnu.org; Mon, 05 Jan 2015 12:24:07 -0500 Received: from mail-wg0-f51.google.com ([74.125.82.51]:45177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8BNn-000515-H8 for qemu-devel@nongnu.org; Mon, 05 Jan 2015 12:23:59 -0500 Received: by mail-wg0-f51.google.com with SMTP id x12so27609937wgg.24 for ; Mon, 05 Jan 2015 09:23:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OzSz7kpONuHdgkEJE/bQ1gDUs+TgocYcB2rjIfEkv6Y=; b=GvyYm6U0pQg4Fw7aeIKhaL+64/58rsTL/PR8lPnFX6g4DaDXrnUjd7GonLHeQTrrAG Ua1V85p3Xc3T4OgxAJ/eoJFiNDoN5y1TR7ExyIHMNwmPI+ZdDDiObwqOB+pF0HvVYVIW uxhpGFGIot7Y7U8HR9xWFX52jzRUJ74kkpqwC1jKuftC/5y0xbQsUww45zNut4mEafnY zOcjQZ/Nswh5+niOMSTASjyKlVzbqXVku4LBBa67kfPQf2+/j4uUvPD44FPirQ1AwMlN NwrkV3Zzu8bi8elvuqFQjPlapXUsoeU6K1GLESCPN9Yu5khS4kp/IqS7KFl4FRHdBlbu Qn0Q== X-Gm-Message-State: ALoCoQlOvsX5grBalsf6D+/PcUgKmKZ9HAP5YYDwe61pnaj3JL1BJ4lnGv7/y91Ky6EV5Cab+IsV X-Received: by 10.194.57.84 with SMTP id g20mr185734876wjq.122.1420478639038; Mon, 05 Jan 2015 09:23:59 -0800 (PST) Received: from vader.pb.local ([62.217.45.26]) by mx.google.com with ESMTPSA id vs8sm51305479wjc.6.2015.01.05.09.23.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 05 Jan 2015 09:23:58 -0800 (PST) From: Eduardo Otubo To: qemu-devel@nongnu.org Date: Mon, 5 Jan 2015 18:23:49 +0100 Message-Id: <1420478629-32500-3-git-send-email-eduardo.otubo@profitbricks.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1420478629-32500-1-git-send-email-eduardo.otubo@profitbricks.com> References: <1420478629-32500-1-git-send-email-eduardo.otubo@profitbricks.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.51 Cc: pmoore@redhat.com, peter.maydell@linaro.org, ehabkost@redhat.com, Eduardo Otubo Subject: [Qemu-devel] [PULL 02/02] 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 From: Paul Moore 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 Signed-off-by: Eduardo Otubo Acked-by: Eduardo Otubo Tested-by: Eduardo Habkost Reviewed-by: Eduardo Habkost --- 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)