Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B732BC433F5 for ; Tue, 28 Sep 2021 11:39:34 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6041B61139 for ; Tue, 28 Sep 2021 11:39:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6041B61139 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=fedoraproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.197931.351186 (Exim 4.92) (envelope-from ) id 1mVBSF-00041H-Rg; Tue, 28 Sep 2021 11:39:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 197931.351186; Tue, 28 Sep 2021 11:39:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mVBSF-00041A-Ok; Tue, 28 Sep 2021 11:39:23 +0000 Received: by outflank-mailman (input) for mailman id 197931; Tue, 28 Sep 2021 11:39:21 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mVBSD-000410-J9 for xen-devel@lists.xenproject.org; Tue, 28 Sep 2021 11:39:21 +0000 Received: from sonic302-20.consmr.mail.sg3.yahoo.com (unknown [106.10.242.140]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b680a539-2050-11ec-bc82-12813bfff9fa; Tue, 28 Sep 2021 11:39:20 +0000 (UTC) Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.sg3.yahoo.com with HTTP; Tue, 28 Sep 2021 11:39:17 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b680a539-2050-11ec-bc82-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1632829157; bh=ig9a+GEMENDbq6RaHsP6jNzuSOjps6RB21m4qLU3NP8=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=GpGydf3G3UBZu3hS4/pdykRd3vtdl3cpTLkM6myxVHltaV7AiGGF0pBZ690eRHao3HqEBdfLnxxjtbxsrWO+Rql8vUgBqXlWqsUKNd9vfng/hGuJ0ljT720QryQi+EqcowRCi9WehI8vwSiood7P73NK4IWg3CtcY4DovIMnBY+10s1rAb0ebEI7caMeeVnpA2gMYfqF2UJL58PndStnsdlOQfh+nTftQ8Z1dCsMPbY4waGVKHmbXoYpDNFcqiAeTfPY7aOacHtaUAwwOxOOHPTc3V7p+fwSQ2TumCq2tYWh98EapTL+rW5NfJD3Su8iwShtl0MTbNBIN/kRv4Rziw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1632829157; bh=Yg0XwtaKmUI6Bqcl2pWhfgps3zqqwrtClGAMnyJ69t5=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=qBAUw+PbjatOWOht0Lb7FiZhmDguQtCgmdW6VfGiGKp9YmtwxcVKKroN8TcRzaHjrxwed/HykuDV527SJMl6p3ezxISsUzmwiYre9ERom9KgvHoPlYFpoNNKDOB70ulHZZGoQt1E7JkkFNflRSrJ9vJfK24keZpApAYu8uxJB9nwY5kWKdcaa1uchvOCLTq7JWAj7VJm0VowO78uy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SSGtezv4vhfIWmXQyxax_MxhbwqSssKbUug3zZXr_XuIgHaSqqnYSqm6L9 g2d2V24Noljs9MBOVOiHRt2Lk1KwZe_6Vc381gXgggAeAMY6YArS0Hp0ETnSK6VLJoNGZ5MlhK4B iAiJ9c_URdKmuuihfgb3I7o2gD5vA25qSjh_j8tfc.jbu0xpXXUW8LwBqJ__44DRIG.e3kBFTcgD uN8ecKQcMXkW3gg4BCqvZQj6V0hvljHWRk9rcj4tWLnv1OKxJ6Xk.rFRzymUpl7Y.ZhyDoLbdVhj DQ8rv1SxbKJuoh3QaYs7u0xtUynrSeg7lDMJbzaSc5f1uPbcPBW5g50v0r0ClmFnFRJdQHuao_Nn ZAnEXA1UMEMLsc3VtUKixgqhqpzTEZoHbwgMdb8pSVemCcHEbsGS_N2UfZb62ivHbJcNOnT0XKA- - X-Sonic-MF: Date: Tue, 28 Sep 2021 11:39:16 +0000 (UTC) From: P J P Reply-To: P J P To: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= Cc: "qemu-devel@nongnu.org" , Thomas Huth , "Michael S. Tsirkin" , Markus Armbruster , Paolo Bonzini , Eduardo Habkost , =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , Eric Blake , Richard Henderson , "qemu-block@nongnu.org" , Peter Maydell , "xen-devel@lists.xenproject.org" Message-ID: <1043465112.1767719.1632829156550@mail.yahoo.com> In-Reply-To: <798304472.4432617.1631626227208@mail.yahoo.com> References: <20210908232024.2399215-1-philmd@redhat.com> <798304472.4432617.1631626227208@mail.yahoo.com> Subject: Re: [RFC PATCH 00/10] security: Introduce qemu_security_policy_taint() API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.19043 YMailNorrin On Tuesday, 14 September, 2021, 07:00:27 pm IST, P J P wrote: >* Thanks so much for restarting this thread. I've been at it intermittentl= y last few > months, thinking about how could we annotate the source/module objects. > > -> [*] https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg04642.htm= l > >* Last time we discussed about having both compile and run time options fo= r users > to be able to select the qualified objects/backends/devices as desired. > >* To confirm: How/Where is the security policy defined? Is it device/modul= e specific OR QEMU project wide? > >>> it feels like we need >> 'secure': 'bool' > >* Though we started the (above [*]) discussion with '--security' option in= mind, > =C2=A0I wonder if 'secure' annotation is much specific. And if we could w= iden its scope. > > >Source annotations: I've been thinking over following approaches >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >1) Segregate the QEMU sources under > > =C2=A0../staging/ <=3D devel/experimental, not for production usage > =C2=A0../src/ <=3D good for production usage, hence security relevant > =C2=A0../deprecated/ <=3D Bad for production usage, not security relevant > > =C2=A0- This is similar to Linux staging drivers' tree. > =C2=A0- Staging drivers are not considered for production usage and hence= CVE allocation. > =C2=A0- At build time by default we only build sources under ../src/ tree= . > =C2=A0- But we can still have options to build /staging/ and /deprecated/= trees. > =C2=A0- It's readily understandable to end users. > >2) pkgconfig(1) way: > =C2=A0- If we could define per device/backend a configuration (.pc) file = which is then used > =C2=A0at build/run time to decide which sources are suitable for the buil= d or usage. > > =C2=A0- I'm trying to experiment with this. > >3) We annotate QEMU devices/backends/modules with macros which define its = status. > =C2=A0It can then be used at build/run times to decide if it's suitable f= or usage. > =C2=A0For ex: > > =C2=A0$ cat annotsrc.h > > =C2=A0#include > > =C2=A0enum SRCSTATUS { > =C2=A0DEVEL =3D 0, > =C2=A0STAGING, > =C2=A0PRODUCTION, > =C2=A0DEPRECATED > =C2=A0}; > ... > > >* Approach 3) above is similar to the _security_policy_taint() API, > =C2=A0but works at the source/object file level, rather than specific 'st= ruct type' field. >=C2=A0 >* Does adding a field to struct type (ex. DeviceClass) scale to all object= s/modules/backends etc? > =C2=A0Does it have any limitations to include/cover other sources/objects= ? > >* I'd really appreciate your feedback/inputs/suggestions. Ping...!? --- =C2=A0 -P J P http://feedmug.com