Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp979651pxb; Fri, 1 Oct 2021 00:07:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxElqeCydArqpH1A31TgjedHPBy9efbvN4Km1NLfqloSb26gew37ML+P9Ur3O/4R+gCbgbX X-Received: by 2002:a17:906:60c2:: with SMTP id f2mr4316203ejk.531.1633072030605; Fri, 01 Oct 2021 00:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633072030; cv=none; d=google.com; s=arc-20160816; b=kmDAlBzE3a9bBbDaa0g107GuyHfFv8i+rvuMX3FCOr+lLywPsDSPlCwdS71jfkRpYQ PUBbX0GdvWKZ8Sou1Mt2ZNu3iiqqbZgtQL7zPG8JBFWckolkD8KSR4qTPM73J2tBzcfc we//NjoYOsZ2aC1oTyux73j4UqzKRM+irp8uZ/8uK7El3Pyfz7dQmVxt1vffmtxlJtcS QP8oc46NBE+lhUj0wJSKfTACRa86JX/wZh4KXmXW6ZGXKK2/yiQk6bKgGLCw+Uhtv4qS ooLIQ/Cs8E1TNK9NSMead55II93fQqkp3oD9jcopqXVcNdcuM5KOxrXclZH22Q8EDmUL Wmag== 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=WGK0ZpPWGa/F2B+mbVoz/QoS719nvDroIlA08rxeWFM=; b=rzoS+pofg2lA8Oo12q0IQDsyMkaeX1ar5brHlHBoXrrhVVsAoWqniG883HClxk9Gzp FWzzt65GuGO7IyfDWEuYUXOAz2wtzTOgcVU1KZOnN9FJ9k6k2le9QIk892pL3BzKi/Qm Dj6RypFopNX9O0pt+iNLN/UEAyYM0X2PMxAqgPk8MSmXQ+RCDDXbqMhYNF/RkkycL3+1 IR99AyOEoK6OPOficLa6KKasFxy1A4zN6XNVAF6mKI/G8nJvplHCSd5milPFwtO26G0V pRYwKXEZY9ivNVLkKQjeqQoAWOmiI0gmhhh2kVAavf89klvty9boA5l5rKJwMob+U1jc dPoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hgoTVKlD; 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 fj2si7444882ejc.474.2021.10.01.00.06.45; Fri, 01 Oct 2021 00:07:10 -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=hgoTVKlD; 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 S1352463AbhJAHGA (ORCPT + 99 others); Fri, 1 Oct 2021 03:06:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:38210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352590AbhJAHFQ (ORCPT ); Fri, 1 Oct 2021 03:05:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 706EA60551; Fri, 1 Oct 2021 07:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633071813; bh=0W38PdEXHIVQIPll+lj+mk7xZAUxC8QpCqNUBGSB+/8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hgoTVKlDOzzRJAnGmyuCwIrPAJq3TBrkWxku6bsjIb9/ByohDLcD1EsZgSY7se0TI CG6q4Q9ASHZQ1Ge5WQJ9cuWOdgkVpeIV8KWygEsbGCk3UM89UEA/GOzhDqsNKz+K58 Qhk0jK55DRI+q71MyjEfmxI23voJ/6FHW597Iwks= Date: Fri, 1 Oct 2021 09:03:29 +0200 From: Greg Kroah-Hartman To: "Kuppuswamy, Sathyanarayanan" Cc: Dan Williams , "Michael S. Tsirkin" , 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> <6d1e2701-5095-d110-3b0a-2697abd0c489@linux.intel.com> <1cfdce51-6bb4-f7af-a86b-5854b6737253@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1cfdce51-6bb4-f7af-a86b-5854b6737253@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 12:04:05PM -0700, Kuppuswamy, Sathyanarayanan wrote: > > > On 9/30/21 8:23 AM, Greg Kroah-Hartman wrote: > > On Thu, Sep 30, 2021 at 08:18:18AM -0700, Kuppuswamy, Sathyanarayanan wrote: > > > > > > > > > On 9/30/21 6:36 AM, Dan Williams wrote: > > > > > 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? > > > > > > Yes, AFAIK, it has been audited. Andi also submitted some patches > > > related to it. Andi, can you confirm. > > > > What is the official definition of "audited"? > > > In our case (Confidential Computing platform), the host is an un-trusted > entity. So any interaction with host from the drivers will have to be > protected against the possible attack from the host. For example, if we > are accessing a memory based on index value received from host, we have > to make sure it does not lead to out of bound access or when sharing the > memory with the host, we need to make sure only the required region is > shared with the host and the memory is un-shared after use properly. You have not defined the term "audited" here at all in any way that can be reviewed or verified by anyone from what I can tell. You have only described a new model that you wish the kernel to run in, one in which it does not trust the hardware at all. That is explicitly NOT what the kernel has been designed for so far, and if you wish to change that, lots of things need to be done outside of simply running some fuzzers on a few random drivers. For one example, how do you ensure that the memory you are reading from hasn't been modified by the host between writing to it the last time you did? Do you have a list of specific drivers and kernel options that you feel you now "trust"? If so, how long does that trust last for? Until someonen else modifies that code? What about modifications to functions that your "audited" code touches? Who is doing this auditing? How do you know the auditing has been done correctly? Who has reviewed and audited the tools that are doing the auditing? Where is the specification that has been agreed on how the auditing must be done? And so on... I feel like there are a lot of different things all being mixed up here into one "oh we want this to happen!" type of thread. Please let's just stick to the one request that I had here, which was to move the way that busses are allowed to authorize the devices they wish to control into a generic way instead of being bus-specific logic. Any requests outside of that type of functionality are just that, outside the scope of this patchset and should get their own patch series and discussion. thanks, greg k-h