Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2442845rdg; Mon, 14 Aug 2023 02:40:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGa8AE676os5H7aK532dpwQyF9KpvY7sab4Pvw5zwrmbrUO2yqm6mVpiCXoMpKDNTaMYL/7 X-Received: by 2002:a17:907:a050:b0:99b:c8bf:3f06 with SMTP id gz16-20020a170907a05000b0099bc8bf3f06mr9624202ejc.24.1692006010061; Mon, 14 Aug 2023 02:40:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692006010; cv=none; d=google.com; s=arc-20160816; b=0jaAnJ9F9qZsWkFqWUbCY+zXaps00VKQlrzg0iy7yakBL1AKGD3Lh6ITvExI29R2Jr IxffexOcd8mH7BAlG06ToYkXyAZKd4/RtWgyTpoQID8EKpmdxv6FqbGeZhczQjdSIy5V n047WbwBrIydCMDQScnEz3KWk186uk0ouif8CG9l6rqTVrex8AkWAfGw4xuzCbOGFiLq wTG2ncMjpQsSxQJjEKI6vhPvf5r2PS2kXr3hr4AmGtvsnYrbyXopqwu+MrR64Blx0CBz rADDD5SRrOiUOnVDzPFMHqZUcXsAnr8Z9rBQ1u5xNryCF7u2E2MIygSHeA6RX4j220YZ wm5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-filter; bh=Hdv0TV7IK5EijrOqDm5tLbEXTg6srsWaFaDw+fUVPxg=; fh=61oyNzrXtAhjapr+c0jG+qtFVpliDB8flsNMGmOX+hM=; b=iEDi5DpNUA+QY1TWj9bk4BqN+lBA7cD7E17xP8PSJzzrlbSPe3JkE9AbUL0XS5f8u6 reUi67B94jRc+PHWXxJnYXdV4xcbS51TIGLvJ+fnTuihrVgWtZO4esXQvvyu7cJNI5/Q /Rif+/3Gz8wBP8Fr0tpEXKAABVwMYdEOEYly1LrSNRYObn+dYqpseU3ctj0K2RZECDAk ufrRmHva2h49/XV2oUhuwBOClzixlVq3vk8sDhJ0OMRJJBDrJ5Ho0zrapNYvYwZ9f5Kl tYHa/BCxDXSPFHSa8z+R8PvrKu5vkj9X6cEQ9XpTnU6gJU2NqPPr8YL5TT65eJcWmEX3 V2pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="m7EMhRo/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oq25-20020a170906cc9900b009889b296070si7495505ejb.261.2023.08.14.02.39.45; Mon, 14 Aug 2023 02:40:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="m7EMhRo/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234170AbjHNJFa (ORCPT + 99 others); Mon, 14 Aug 2023 05:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234106AbjHNJE6 (ORCPT ); Mon, 14 Aug 2023 05:04:58 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B36C10F for ; Mon, 14 Aug 2023 02:04:57 -0700 (PDT) Received: from [192.168.2.41] (77-166-152-30.fixed.kpn.net [77.166.152.30]) by linux.microsoft.com (Postfix) with ESMTPSA id 3BBD02100EDE; Mon, 14 Aug 2023 02:04:54 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3BBD02100EDE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1692003896; bh=Hdv0TV7IK5EijrOqDm5tLbEXTg6srsWaFaDw+fUVPxg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=m7EMhRo/a55p4EjUMggu4NIf79girf/NR3+g9eY+gA8uikwrHk8AsmruKMG8sdhIk uJWJIC7lW6LdzuBuaxp5zXbPNaPd72XFYXDsIoGDXBMQbPWAZ06j4lAaN7VKxLk4bi +Q2aHfYkSDUYZC0HjO1chi9jEQyhVNpW0IMeYCbg= Message-ID: <57f3a05e-8fcd-4656-beea-56bb8365ae64@linux.microsoft.com> Date: Mon, 14 Aug 2023 11:04:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/5] tsm: Attestation Report ABI Content-Language: en-US To: Dan Williams , linux-coco@lists.linux.dev Cc: Brijesh Singh , Kuppuswamy Sathyanarayanan , Peter Zijlstra , Tom Lendacky , Peter Gonda , Borislav Petkov , Dionna Amalie Glaze , Samuel Ortiz , Greg Kroah-Hartman , Andrew Morton , James Bottomley , x86@kernel.org, linux-kernel@vger.kernel.org References: <169199898909.1782217.10899362240465838600.stgit@dwillia2-xfh.jf.intel.com> From: Jeremi Piotrowski In-Reply-To: <169199898909.1782217.10899362240465838600.stgit@dwillia2-xfh.jf.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/14/2023 9:43 AM, Dan Williams wrote: > Changes since v1: > - Switch from Keyring to sysfs (James) > > An attestation report is signed evidence of how a Trusted Virtual > Machine (TVM) was launched and its current state. A verifying party uses > the report to make judgements of the confidentiality and integrity of > that execution environment. Upon successful attestation the verifying > party may, for example, proceed to deploy secrets to the TVM to carry > out a workload. Multiple confidential computing platforms share this > similar flow. > > The approach of adding adding new char devs and new ioctls, for what > amounts to the same logical functionality with minor formatting > differences across vendors [1], is untenable. Common concepts and the > community benefit from common infrastructure. > > Use sysfs for this facility for maintainability compared to ioctl(). The > expectation is that this interface is a boot time, configure once, get > report, and done flow. I.e. not something that receives ongoing > transactions at runtime. However, runtime retrieval is not precluded and > a mechanism to detect potential configuration conflicts from > multiple-threads using this interface is included. > I wanted to speak up to say that this does not align with the needs we have in the Confidential Containers project. We want to be able to perform attestation not just once during boot but during the lifecycle of the confidential VM. We may need to fetch a fresh attestation report from a trusted agent but also from arbitrary applications running in containers. The trusted agent might need attestation when launching a new container from an encrypted container image or when a new secret is being added to the VM - both of these events may happen at any time (also when containerized applications are already executing). Container applications have their own uses for attestation, such as when they need to fetch keys required to decrypt payloads. We also have things like performing attestation when establishing a TLS or ssh connection to provide an attested e2e encrypted communication channel. I don't think sysfs is suitable for such concurrent transactions. Also if you think about exposing the sysfs interface to an application in a container, this requires bind mounting rw part of the sysfs tree into the mount namespace - not ideal. Jeremi > The keyring@ list is dropped on this posting since a new key-type is no > longer being pursued. > > Link: http://lore.kernel.org/r/cover.1684048511.git.sathyanarayanan.kuppuswamy@linux.intel.com > > --- > > Dan Williams (5): > virt: coco: Add a coco/Makefile and coco/Kconfig > tsm: Introduce a shared ABI for attestation reports > virt: sevguest: Prep for kernel internal {get,get_ext}_report() > mm/slab: Add __free() support for kvfree > virt: sevguest: Add TSM_REPORTS support for SNP_{GET,GET_EXT}_REPORT > > > Documentation/ABI/testing/sysfs-class-tsm | 47 +++++ > MAINTAINERS | 8 + > drivers/virt/Kconfig | 6 - > drivers/virt/Makefile | 4 > drivers/virt/coco/Kconfig | 13 + > drivers/virt/coco/Makefile | 8 + > drivers/virt/coco/sev-guest/Kconfig | 1 > drivers/virt/coco/sev-guest/sev-guest.c | 129 ++++++++++++- > drivers/virt/coco/tdx-guest/Kconfig | 1 > drivers/virt/coco/tsm.c | 290 +++++++++++++++++++++++++++++ > include/linux/slab.h | 2 > include/linux/tsm.h | 45 +++++ > 12 files changed, 535 insertions(+), 19 deletions(-) > create mode 100644 Documentation/ABI/testing/sysfs-class-tsm > create mode 100644 drivers/virt/coco/Kconfig > create mode 100644 drivers/virt/coco/Makefile > create mode 100644 drivers/virt/coco/tsm.c > create mode 100644 include/linux/tsm.h > > base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5