Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5133529yba; Wed, 10 Apr 2019 12:05:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxs3jFSwWZAJiyIzho1kZWKPGTNFJO4y44EPixBGS+8mtQnbw8Mb5q+NQgWKLVqICF7/Ch4 X-Received: by 2002:a63:2b41:: with SMTP id r62mr40671165pgr.403.1554923159730; Wed, 10 Apr 2019 12:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554923159; cv=none; d=google.com; s=arc-20160816; b=Qi1fT+jT9mswEhkbBNzcPlGGABcaz/q7BR52XjLZMinmZKdkFU1Y9X/IW/DANRv/M7 V87d7RzVFUovNBhHB1s6IVQeJqpSxV7apvgaMZyVN3Zj/nhzv5trxKi6Hepsdhe6NhK9 eI+OtD+dybYdNpLQJxJyCftDPYbcbLrf1Xi0pbkZ9lieqsHumDWk0aKbnvhb46OTsmn+ RoEtEk2qx7zLrA7v6IMlFmVnxU1xKajxilyMarxNoImdvkT/1Yerty2+GKAn5lYaemEh aajuxfHtL05I1SPUWKbauEraC1TrTfog2DbcLKgEylTrBOVueqPVx3jOdHCRA64UI1sk E5ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ivMH5g0RKUN64IY3yZa8a6qr+LNh1pxNxXNnYoERWzE=; b=lZLWg/3jhk5xjvXtgzyzOR3IiZ0u0c+q7vXN61BegGsbf9d9aEuh/Kbf8qmUzginVE P11U6AvK+7BWhl9bMfyX/CncGc4+9La7O+2pAA/f2PThtxIccuVzEz38dN7dd21lqa+A Qii23aU8gIPpFOZKw/GmwF1095YKSvezGJtkUUAGsugTPwpleK/EBz95odb4Z21L5Mt6 85tWmLYgC7UOfQkKj2sHlh0PCQGFq5xmg22KMS75X78GKHlnQmdkHMHL/NpelP3MACwM 3JdoRsrqNs4dT3YvFmL8QCZFGO2r7IcuXBQ436P4rCBVRZG0Old0Go1Jr/netL9y3wA5 7kmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id h10si11790919plb.348.2019.04.10.12.05.43; Wed, 10 Apr 2019 12:05:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729770AbfDJRi2 (ORCPT + 99 others); Wed, 10 Apr 2019 13:38:28 -0400 Received: from mga18.intel.com ([134.134.136.126]:52864 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729224AbfDJRi2 (ORCPT ); Wed, 10 Apr 2019 13:38:28 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 10:38:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,334,1549958400"; d="scan'208";a="141635121" Received: from jsakkine-mobl.ger.corp.intel.com (HELO localhost) ([10.251.87.38]) by orsmga003.jf.intel.com with ESMTP; 10 Apr 2019 10:38:20 -0700 Date: Wed, 10 Apr 2019 20:38:18 +0300 From: Jarkko Sakkinen To: Sasha Levin Cc: robh+dt@kernel.org, mark.rutland@arm.com, peterhuewe@gmx.de, jgg@ziepe.ca, linux-kernel@microsoft.com, bryankel@microsoft.com, thiruan@microsoft.com, suredd@microsoft.com, arnd@arndb.de, gregkh@linuxfoundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org Subject: Re: [PATCH 2/2] ftpm: firmware TPM running in TEE Message-ID: <20190410173318.GA9052@linux.intel.com> References: <20190402193316.15144-1-sashal@kernel.org> <20190402193316.15144-2-sashal@kernel.org> <20190403181827.GB17006@linux.intel.com> <20190403182728.GA17451@linux.intel.com> <20190406153047.GF2935@sasha-vm> <20190410112927.GA6586@linux.intel.com> <20190410160432.GB11568@sasha-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190410160432.GB11568@sasha-vm> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 10, 2019 at 12:04:32PM -0400, Sasha Levin wrote: > On Wed, Apr 10, 2019 at 02:29:27PM +0300, Jarkko Sakkinen wrote: > > On Sat, Apr 06, 2019 at 11:30:47AM -0400, Sasha Levin wrote: > > > On Wed, Apr 03, 2019 at 09:27:28PM +0300, Jarkko Sakkinen wrote: > > > > On Wed, Apr 03, 2019 at 09:18:27PM +0300, Jarkko Sakkinen wrote: > > > > > On Tue, Apr 02, 2019 at 03:33:16PM -0400, Sasha Levin wrote: > > > > > > This patch adds support for a software-only implementation of a TPM > > > > > > running in TEE. > > > > > > > > > > > > There is extensive documentation of the design here: > > > > > > https://www.microsoft.com/en-us/research/publication/ftpm-software-implementation-tpm-chip/ . > > > > > > > > > > > > As well as reference code for the firmware available here: > > > > > > https://github.com/Microsoft/ms-tpm-20-ref/tree/master/Samples/ARM32-FirmwareTPM > > > > > > > > > > > > Signed-off-by: Thirupathaiah Annapureddy > > > > > > Signed-off-by: Sasha Levin > > > > > > > > > > What is the context anyway? I mean tpm_crb already supports fTPM running > > > > > in TZ. > > > > > > > > Might take 2-3 weeks before I have time to go through ftpm1.pdf with > > > > full concentration. I did search through the PDF for CRB and found > > > > zero hits. > > > > > > The fTPM as described in that paper and implemented in practice does not > > > use the CRB interface, thus we can't use tpm_crb to interface with the > > > firmware TPM. > > > > Obviously not but what is the reason of not implementing CRB but instead > > making yet another interface? I mean CRB supports SMC call. > > > > For me this is taking steps back as to the early days when there was > > proprietary intefaces to TPM before TCG came along and stardized. > > > > I'm sure that the TPM implementation itself could be reworked to > > inteface using CRB. It would also be good for ARM as a platform as now > > this new made up interface causes unwanted divergence. I thought that > > throwing ad hoc intefaces everywhere is something that ARM Linux > > community tries to reduce, not increase. > > I'm not sure what the original reasons were for not using the CRB > interface. Note that the paper is from a few years ago, and > implementations of this fTPM existed before the paper, so it's very > possible that it just predates CRB. > > Either way, there is existing hardware that runs this TPM and I'm trying > to get it out of Microsoft's tree and get it upstream. There's not much > I could do about existing hardware at this point. OK, the 2nd paragraph kind of is enough reason to pull it. Thanks for elaborating this. Just wanted to get a clearer picture where this sits in the universe. I'll do detailed review as soon as I have time. I don't need to have the hardware as long as *someone* could give tested-by for this. /Jarkko