From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlWDJ-0000jI-OF for qemu-devel@nongnu.org; Sun, 01 Jul 2012 22:18:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SlWDI-0002wE-2N for qemu-devel@nongnu.org; Sun, 01 Jul 2012 22:18:09 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:44221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SlWDH-0002vz-OE for qemu-devel@nongnu.org; Sun, 01 Jul 2012 22:18:07 -0400 Received: by lbok6 with SMTP id k6so6267894lbo.4 for ; Sun, 01 Jul 2012 19:18:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4FF04FE3.20905@redhat.com> References: <20120613203305.GC6019@redhat.com> <20120618083335.GD28026@redhat.com> <4FDF479B.9060502@linux.vnet.ibm.com> <4FDFA36E.4010802@linux.vnet.ibm.com> <4FF04FE3.20905@redhat.com> Date: Sun, 1 Jul 2012 21:18:03 -0500 Message-ID: From: Will Drewry Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [RFC] [PATCHv2 2/2] Adding basic calls to libseccomp in vl.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Blue Swirl , Paul Moore , Corey Bryant , qemu-devel@nongnu.org, Eduardo Otubo On Sun, Jul 1, 2012 at 8:25 AM, Paolo Bonzini wrote: > Il 18/06/2012 23:53, Corey Bryant ha scritto: >>> >>> Can each thread have separate seccomp whitelists? For example CPU >>> threads should not need pretty much anything but the I/O thread needs >>> I/O. >>> >> >> No, seccomp filters are defined and enforced at the process level. > > Perhaps we can add (at the kernel level) a way for seccomp filters to > examine the current tid. seccomp filters are attached to the task_struct and apply per "thread" or per process since they both get their own task_structs. (For Linux, process==thread with shared resources.) Filter programs are also inherited across clone/fork, so it's possible to install a "global" filter program which applies which is inherited during thread creation, then apply per-thread refinements by stacking on additional filters (at the cost of additional evaluation time). hth! will