Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2409023rdg; Mon, 14 Aug 2023 01:12:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGVUpowGgMPYgtzjYwx3FJNatlrkgKB4oSn2FIGgaf5CJd6xw+jAvXmaYt7kl2B21qzuC+K X-Received: by 2002:a17:902:a584:b0:1b8:95a1:847c with SMTP id az4-20020a170902a58400b001b895a1847cmr6510055plb.40.1692000751623; Mon, 14 Aug 2023 01:12:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692000751; cv=none; d=google.com; s=arc-20160816; b=ZFqCMxckmrqof3d6OgC/AY9pcH2FQPuOeVJ9P00JTR1EZlzaiPLMYk1A3qrJJNC+ld 3281w1Q6MRJGJpnb7EzKN4lzcwPrreBSVxf7nBP9ZS6/m1bxGbn4UVpCT7LOP6KMg4g5 u5FGZi838KRRyuhUgF51usfBgSiBAtpMpM2YBtxdWPtihGieq03kFbXzucsno6Cottui OMTZWPW2v5FKAJ5fduLmkKf+Poq69WIBR+Tjz5fbvOAE+ITMn169f3/Bk142jnSQ9b+j 13nI7J//66WJqZqIgbJK3D9vuJotZg/5WyJFUmia2YwKz2Fk4myp8BKP2y5gsGHPWUq3 p/8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=p5cUcT8wF77nf9iUrPEtHcBi6LnhhdGp0Ic679lQZSw=; fh=2F7FVv8GMqp0tO+vCQlAEioeqfrIQhbhovvdp6tJw6s=; b=Ew1r/Uo+MiKzrDBZg/iYN/DnYevRhatc8PlvlZEYARrbOqMkAgfw+YpeXPNjOhsQ9C V5ORHGl7VsJtFiR6OS6BzdkJ4t2FHiicqgUouXL1fsntw3010Lhq9FPd/fbobQRf6JCc 7ENgARgA22TK1A2qaVri9YqO16ibUJufx2v7w8jMmEKiUgF/Qlgf+dSZTprXBmzaWeuc +4r0luLItqs9m1+MHGWGYsMKEbdDCaII271ncZXFLKpiVk4/xOJ9xFjKLsU4gFevdOy4 iNz8Xohkks77+iTobrB0y3TEWf3jKjQJTsw2Z7bZJo48LB3IF3TaNF4jl5w5FuwovDE8 biPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PChgSSfF; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a170902c40700b001bb0fb5e06csi8160401plk.483.2023.08.14.01.12.18; Mon, 14 Aug 2023 01:12:31 -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=@intel.com header.s=Intel header.b=PChgSSfF; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234053AbjHNHno (ORCPT + 99 others); Mon, 14 Aug 2023 03:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234339AbjHNHnL (ORCPT ); Mon, 14 Aug 2023 03:43:11 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E91BC115 for ; Mon, 14 Aug 2023 00:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691998990; x=1723534990; h=subject:from:to:cc:date:message-id:mime-version: content-transfer-encoding; bh=TwoF5fq59lRt7vlTdgDePaChbL1k3CWvyUQLNnCPZ/s=; b=PChgSSfFONf5HgCMJjgsaKJywC7ChfzxxMIdjYPwhbZgq+PIDtxf2w/F XSvHeEZN2ZaClinOe+Z2u4qqQlqbquKZIYd1T1DZBikhvEAFJFHVkhUqw v7qTNQIG41SMhWPNA2b7oSyXMjK3S0bdIxNGd4ws0/omgQkdUuEWGnyod iRx2qQNZEWqN3e6VWIxImgiu2X/nM3cL8tvOWxTpppdkO2cflAL163U33 /7hrNMJfKMhgjVAY0e3HR5CGXsjCij2tKGNUkl6vqTHYjSFFunPwc1NCb g7VAjCkr0SkoteeHG/pi9rG8QyuuUSbM6ikx2ftdLlEpYsBMi9/HakH6f w==; X-IronPort-AV: E=McAfee;i="6600,9927,10801"; a="370882719" X-IronPort-AV: E=Sophos;i="6.01,172,1684825200"; d="scan'208";a="370882719" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2023 00:43:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10801"; a="736445226" X-IronPort-AV: E=Sophos;i="6.01,172,1684825200"; d="scan'208";a="736445226" Received: from navanban-mobl.amr.corp.intel.com (HELO dwillia2-xfh.jf.intel.com) ([10.209.127.25]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2023 00:43:09 -0700 Subject: [PATCH v2 0/5] tsm: Attestation Report ABI From: Dan Williams To: linux-coco@lists.linux.dev Cc: Brijesh Singh , Kuppuswamy Sathyanarayanan , Peter Zijlstra , Tom Lendacky , Peter Gonda , Borislav Petkov , Dionna Amalie Glaze , Samuel Ortiz , Dionna Glaze , Greg Kroah-Hartman , Andrew Morton , James Bottomley , x86@kernel.org, linux-kernel@vger.kernel.org Date: Mon, 14 Aug 2023 00:43:09 -0700 Message-ID: <169199898909.1782217.10899362240465838600.stgit@dwillia2-xfh.jf.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 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. 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