Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1280141pxj; Fri, 21 May 2021 10:19:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwb5Q8RS4oLByB8oXd+zJpn9AU/2mlNXrFgak6SRcQBKfG9Fp2cQn9EmxXcj8dFMONe+r11 X-Received: by 2002:a50:f385:: with SMTP id g5mr12639455edm.222.1621617592656; Fri, 21 May 2021 10:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621617592; cv=none; d=google.com; s=arc-20160816; b=G3aRqEuiE/GCgr8EYXrupvjxQIoFMXl6K5Ph4R8zVEH/VzI1ASiKiF/Q1/Xt4s/Jg0 hduzonmIVgbErc24gmertoKXecEoGe+qvh8oyNeX4r/4pCfMltB7TSZy8kODV4UAfSmI L6aUBL3nzUgk3miPSoRS+X26ERa/cKpbOPUoAdk98OW6NNdiPbqkZC/fo+yfVVIkLz70 8Y8gPiFILcteqiAj3VAxgIVwlK37xSVp4gXOSDf+L3WmMa2WhNRl5uOTR4makBhbogs2 xF329lXT2wp5OlK0314AvUFeW3sodSFEbxwUOipKeq1dj9mjgeYyfrIFl9trhvDejI4O pBKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=WKaOj56KXP+coPTHNJRvEsIDSuRo99G7CVMghNRsY1s=; b=h+W/EHdjZzedrxiSApgo0LAnO63Ups2VUUkEY2ydRWV3m7rIMCLqzAYKaxDqlknb41 QWqxw6DF7cILch77WZZwcqa1AiitDzFyDiQCxGBPspHQOsesKu0inpSDtrqgPgyvLDXM LFpPH1ryPm5FO7cSdmj8aOMaKsdta2AXUC3XEQBVnmc4F75k2G98AeJGISlPGmOMzSUW aU9EyIXbIFi0cYxZ8u35eukr4o941FXFeIdNNxHluOiGbJbQyUQ/Nq72Y4tA0T0U+X9I YXIyw9lfVTTbYMwWKT9pTgrbkTCEPqcdmTjMs4A6dLeC0yCtike4tILCJ0YMAiHXRB5S ZdWw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si5691176eds.345.2021.05.21.10.19.29; Fri, 21 May 2021 10:19:52 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231173AbhETWDl (ORCPT + 99 others); Thu, 20 May 2021 18:03:41 -0400 Received: from mga12.intel.com ([192.55.52.136]:49120 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbhETWDl (ORCPT ); Thu, 20 May 2021 18:03:41 -0400 IronPort-SDR: IT1Xd+0wLmDiJN0IZHTaiMHIXvdkCbAOaS5qxOQRFeycmQo/lkyPQnECxzQwaxScQKxmKxPmYr Qrn3NcEhkJbw== X-IronPort-AV: E=McAfee;i="6200,9189,9990"; a="180954367" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="180954367" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2021 15:02:19 -0700 IronPort-SDR: +aAe5WlQDqLOR+GbbEmM2f9botOQNm+eucww5GgQWidItvwmCQjLNIrVjc/06ldIyE8zSop1DT A4iVLvNkMByA== X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="475410755" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.212.197.177]) ([10.212.197.177]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2021 15:02:17 -0700 Subject: Re: [RFC PATCH 0/3] Allow access to confidential computing secret area To: "Dr. David Alan Gilbert" , Brijesh Singh Cc: Dov Murik , linux-efi@vger.kernel.org, Tobin Feldman-Fitzthum , Tobin Feldman-Fitzthum , Jim Cadden , James Bottomley , Hubertus Franke , Mike Rapoport , Laszlo Ersek , Ashish Kalra , Tom Lendacky , Ard Biesheuvel , James Morris , "Serge E. Hallyn" , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210513062634.2481118-1-dovmurik@linux.ibm.com> <2c8ae998-6dd0-bcb9-f735-e90da05ab9d9@amd.com> From: Andi Kleen Message-ID: Date: Thu, 20 May 2021 15:02:16 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/20/2021 3:56 AM, Dr. David Alan Gilbert wrote: > * Brijes > The nice thing about Dov's device/file is that it's a simple text file > that userspace can then read the secret out of; I'm not sure if there's > anything similar in SNP (or for that matter TDX, cc'ing in Andi) In TDX there are two different mechanisms: - One is a ACPI table (SVKL) that allows to pass small pieces of data like keys from the BIOS. We have a little driver to read and clear the SVKL data. This would only be used if the TD BIOS does the negotiation for the secrets, which it doesn't do currently. - In the other model the negotiation is done by a user program, just using another driver to issue calls to the TDX module. The calls just expose the TDREPORT, which encodes the attestation data, but does not actually include any secret. Then the negotiation for the secrets is done by the program, which can then pass it out to other programs (like mount for encrypted file systems). In such a case the secret is never touched by the kernel. At least initially we'll use the second option. -Andi 57ccc1