Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1401960pxj; Fri, 21 May 2021 13:22:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGoEMKAPbHrErsBj7d4z+37bXb6QTACLfbQGtxfBQOJzcPu8V9OqIyzJnnWOFMLrKJ62fH X-Received: by 2002:a92:cf45:: with SMTP id c5mr710617ilr.182.1621628536568; Fri, 21 May 2021 13:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628536; cv=none; d=google.com; s=arc-20160816; b=pytja0f72pJp0NQ0RlPYsczi5HM6AnIbtaZ2emiFFwM3y90xQ1VH3ZdBkjuh+LX6K0 2FdDbi51VHVlb75Ercq/sDCo6RbgDLnZ253JQ32eDZcKY6ECWPE8Guk9YdkI+aR/aFaf G4PooQJpToEIkh8k9qB3Ad9oKc+o0Qe3onKsRSmMYb4YO1i+gRufS22TBMaS7x/2fcv3 Kdk17QtvJ5HiJG37lzskCsID6eLsFylgZq53aYvlq2A93nJozOnI/CPhIvwJRL/AzPQ4 iLQqeb1WPAcf+NT4amuWu3N7YxQiE1NOaxjSfKiAVjSMrgoQ379P9e/Hsb800xwrbeUn h24Q== 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=9jzR2kWzRBlRWgHQNkM3cMYXVeahXyj0q9fz7/I3A20=; b=xpiDFCllBMQCNjv+1TeNnsZ3NkMJYz5UIpvziXq4KzKaVGutZ+PzgMr6xuqG+2zEmg RZBNaQXy1LEJueRsLjD6BnTruyuG78xl8pANUWD3l4bovzsFhFfrXT3HtdEbDnm+a85J 9FeBwuQYIc5ZX5fza8Vyg2z/qm8IUKj+4A7qTgB2LftoOQd1RPZC2ZuYM4hNOEdC6g+o VNKvbQWyBjlenn+eG/HBihyt0s4q2qtogdmZER2VKWvyrytXj1LDZyucZ8E0iSSMTlaY pzA8t30GM7lprdqbQ0DnuH6ZNFmzvp0s8yXpx6Y1+Cjts1txCcHcmIHsCVf2c4Fmk49W hTtA== 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 r2si6334419jak.13.2021.05.21.13.22.04; Fri, 21 May 2021 13:22:16 -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 S236732AbhEUQnJ (ORCPT + 99 others); Fri, 21 May 2021 12:43:09 -0400 Received: from mga05.intel.com ([192.55.52.43]:30226 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233011AbhEUQnI (ORCPT ); Fri, 21 May 2021 12:43:08 -0400 IronPort-SDR: EV8RmoBV/vnHBfWhNPkmuQPVdFldDOZ1is4YtPt9I8IyiCsN4xBo8X5AokGx+rGuGfEmgSHwDU XVgkp2SqGjZw== X-IronPort-AV: E=McAfee;i="6200,9189,9991"; a="287063124" X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="287063124" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 09:41:45 -0700 IronPort-SDR: fihFgKgFyU4X7JN8xnsj9NsQA7GNOfUCliJzqMqkTCiJEKn1T1CNCkPxiRzx1azpsblOU88HsC /t9X7Ur0n7Pg== X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="544146935" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.212.131.65]) ([10.212.131.65]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2021 09:41:43 -0700 Subject: Re: [RFC PATCH 0/3] Allow access to confidential computing secret area To: Brijesh Singh , "Dr. David Alan Gilbert" 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, Kuppuswamy Sathyanarayanan References: <20210513062634.2481118-1-dovmurik@linux.ibm.com> <2c8ae998-6dd0-bcb9-f735-e90da05ab9d9@amd.com> From: Andi Kleen Message-ID: <45842efd-7b6b-496f-d161-e5786760078d@linux.intel.com> Date: Fri, 21 May 2021 09:41:42 -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 > The SEV-SNP attestation approach is very similar to what Andi described > for the TDX. However, in the case of legacy SEV and ES, the attestation > verification is performed before the guest is booted. In this case, the > hyervisor puts the secret provided by the guest owner (after the > attestation) at a fixed location. Dov's driver is simply reading that > fixed location and making it available through the simple text file. That's the same as our SVKL model. The (not yet posted) driver is here: https://github.com/intel/tdx/commit/62c2d9fae275d5bf50f869e8cfb71d2ca1f71363 We opted to use ioctls, with the idea that it should be just read and cleared once to not let the secret lying around. Typically you would just use it to set up dmcrypt or similar once. I think read-and-clear with explicit operations is a better model than some virtual file because of the security properties. -Andi