From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGxps-0000lq-Ti for qemu-devel@nongnu.org; Tue, 03 Sep 2013 17:08:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGxpj-0005Vt-W3 for qemu-devel@nongnu.org; Tue, 03 Sep 2013 17:08:28 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:57440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGxpj-0005Vc-Ow for qemu-devel@nongnu.org; Tue, 03 Sep 2013 17:08:19 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Sep 2013 15:08:16 -0600 Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 84186C9003E for ; Tue, 3 Sep 2013 17:08:13 -0400 (EDT) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by b01cxnp23034.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r83L8DJX24314090 for ; Tue, 3 Sep 2013 21:08:13 GMT Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r83L8C5K024171 for ; Tue, 3 Sep 2013 17:08:13 -0400 Message-ID: <52264FBB.6070706@linux.vnet.ibm.com> Date: Tue, 03 Sep 2013 17:08:11 -0400 From: Corey Bryant MIME-Version: 1.0 References: <1377738272-3470-1-git-send-email-otubo@linux.vnet.ibm.com> <20130829083411.GD23096@stefanha-thinkpad.redhat.com> <5220AA75.7080402@linux.vnet.ibm.com> <5226243B.6040001@linux.vnet.ibm.com> <5226410A.6070705@linux.vnet.ibm.com> In-Reply-To: <5226410A.6070705@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] seccomp: adding a second whitelist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Otubo Cc: pmoore@redhat.com, Stefan Hajnoczi , wad@chromium.org, qemu-devel@nongnu.org On 09/03/2013 04:05 PM, Eduardo Otubo wrote: > > > On 09/03/2013 03:02 PM, Corey Bryant wrote: >> >> >> On 08/30/2013 10:21 AM, Eduardo Otubo wrote: >>> >>> >>> On 08/29/2013 05:34 AM, Stefan Hajnoczi wrote: >>>> On Wed, Aug 28, 2013 at 10:04:32PM -0300, Eduardo Otubo wrote: >>>>> Now there's a second whitelist, right before the vcpu starts. The >>>>> second >>>>> whitelist is the same as the first one, except for exec() and >>>>> select(). >>>> >>>> -netdev tap,downscript=/path/to/script requires exec() in the QEMU >>>> shutdown code path. Will this work with seccomp? >>> >>> I actually don't know, but I'll test that as well. Can you run a test >>> with this patch and -netdev? I mean, if you're pointing that out you >>> might have a scenario already setup, right? >>> >>> Thanks! >>> >> >> This uses exec() in net/tap.c. >> >> I think if we're going to introduce a sandbox environment that restricts >> existing QEMU behavior, then we have to introduce a new argument to the >> -sandbox option. So for example, "-sandbox on" would continue to use >> the whitelist that allows everything in QEMU to work (or at least it >> should :). And something like "-sandbox on,strict=on" would use the >> whitelist + blacklist. > > I think tihs is very reasonable. I'll working on implementing this > options for v2. > >> >> If this is acceptable though, then I wonder how we could go about adding >> new syscalls to the blacklist in future QEMU releases without regressing >> "-sandbox on,strict=on". >> >> By the way, are any test buckets running regularly with -sandbox on? > > I am running tests with virt-test. Need to come up with a script that > checks for unused syscalls, though. > Would it be possible to submit a patch to turn on -sandbox for some/all QEMU virt-test tests? That would enable regular regression runs that aren't dependent on you. Plus it would be a good proof point of the QEMU seccomp support if the tests run successfully. -- Regards, Corey Bryant