Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp321981pxb; Thu, 30 Sep 2021 06:52:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4pJdlwo6YBvTNmW+k7RhBQaoA0aBKlSyYkGDrFJtJDFL8867WtGLmwTAjC4HUgGUE6Tzz X-Received: by 2002:a50:fd8a:: with SMTP id o10mr7265085edt.256.1633009922486; Thu, 30 Sep 2021 06:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633009922; cv=none; d=google.com; s=arc-20160816; b=UdDcXPuZWSkKHDTTIAjRH9o09SOd2Phg+IZ5ZknaLTmQag39ghSDW5Z2IDXsbGDd8+ YdLRa80bcmewUGrY6K/1/1J1M2xrzQxTaCo2GDQSqmMV/D8cSwzbmBDhtcx+j3eO9cJ/ +hri75FPUIUdlu2nTOz9tbni/omk+xoWdGmrm62uzjqYiyikHnzzUjlpVVdA8YI21IHa KsipfDPOGVSkF7nUVPWKGfwOpZm2p5cQ8FmZeI+oeOsJNaBDTqyKZeGczf/2agK6NnVG txb/Ltab9PHWnMrl26T2P/Oizl7mBn38I5IxKHJNK2mbiqG28bUffK27qCJV8gtRpiE6 X6DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EiuUfY0aVKU93f63a3pfRihNdv0xDF30+oIChwZNOh8=; b=XktxHslXx9cvBhmCBYADQJMDoDQHvYfBwvLaW+IlDB3AZyf6cv259PnbIt9bjTtH1t wdeoeFIp0RwpzYxzbJ09CQNUHe5saSDDwLfgOtm6ARmFZy7gMTCySN8PqftlzZIaMvjt 4XdoDfZBP5bd5xDacyjZY+a5u6AmLaK4OHsWNAMMFv22/hBmvWvIbM7HMh5vIkwEmd+5 DfQMGzZ0zO7gUDSE4bGXTDUK0PySH1+jd47lR1kQrEMLgliVxiqTMyRtJAgEiUCF/SaE jGJzoS4ockz5d0t4KetNtkPiL8HXbhe00M1cieRib9txVCzVdFytk9t1ig6jfJlBcPpL e1/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=arqSlanb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l1si3648114eda.198.2021.09.30.06.51.36; Thu, 30 Sep 2021 06:52:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=arqSlanb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351355AbhI3NvV (ORCPT + 99 others); Thu, 30 Sep 2021 09:51:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:49708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350901AbhI3NvU (ORCPT ); Thu, 30 Sep 2021 09:51:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 603936187A; Thu, 30 Sep 2021 13:49:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633009777; bh=U9iiEkqwLSIMx5qFueAE+WdXrbQNjtowDTehHAGMyMw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=arqSlanbgqlgNfeZnJyDO5TTSOWckEPTV6037BqAX1Oo8Dp6/LdUnXNOKFZoLgwX+ 24sWxMcDrtnlE/p2kjHOyZE4vtzM6WKa4tqjc84ZNdsX5z+/euJ/RscKpMwcFl3Frb A2IBrCokTmoxJCxJjnoYtyjZxHGiv8AMjacbbWl4= Date: Thu, 30 Sep 2021 15:49:35 +0200 From: Greg Kroah-Hartman To: Dan Williams Cc: "Michael S. Tsirkin" , Kuppuswamy Sathyanarayanan , Borislav Petkov , X86 ML , Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Andreas Noever , Michael Jamet , Yehezkel Bernat , "Rafael J . Wysocki" , Mika Westerberg , Jonathan Corbet , Jason Wang , Andi Kleen , Kuppuswamy Sathyanarayanan , Linux Kernel Mailing List , Linux PCI , USB list , virtualization@lists.linux-foundation.org Subject: Re: [PATCH v2 4/6] virtio: Initialize authorized attribute for confidential guest Message-ID: References: <20210930010511.3387967-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20210930010511.3387967-5-sathyanarayanan.kuppuswamy@linux.intel.com> <20210930065953-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 06:36:18AM -0700, Dan Williams wrote: > On Thu, Sep 30, 2021 at 4:03 AM Michael S. Tsirkin wrote: > > > > On Wed, Sep 29, 2021 at 06:05:09PM -0700, Kuppuswamy Sathyanarayanan wrote: > > > Confidential guest platforms like TDX have a requirement to allow > > > only trusted devices. By default the confidential-guest core will > > > arrange for all devices to default to unauthorized (via > > > dev_default_authorization) in device_initialize(). Since virtio > > > driver is already hardened against the attack from the un-trusted host, > > > override the confidential computing default unauthorized state > > > > > > Reviewed-by: Dan Williams > > > Signed-off-by: Kuppuswamy Sathyanarayanan > > > > Architecturally this all looks backwards. IIUC nothing about virtio > > makes it authorized or trusted. The driver is hardened, > > true, but this should be set at the driver not the device level. > > That's was my initial reaction to this proposal as well, and I ended > up leading Sathya astray from what Greg wanted. Greg rightly points > out that the "authorized" attribute from USB and Thunderbolt already > exists [1] [2]. So the choice is find an awkward way to mix driver > trust with existing bus-local "authorized" mechanisms, or promote the > authorized capability to the driver-core. This patch set implements > the latter to keep the momentum on the already shipping design scheme > to not add to the driver-core maintenance burden. > > [1]: https://lore.kernel.org/all/YQuaJ78y8j1UmBoz@kroah.com/ > [2]: https://lore.kernel.org/all/YQzF%2FutgrJfbZuHh@kroah.com/ > > > And in particular, not all virtio drivers are hardened - > > I think at this point blk and scsi drivers have been hardened - so > > treating them all the same looks wrong. > > My understanding was that they have been audited, Sathya? Please define "audited" and "trusted" here. thanks, greg k-h