Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4764169yba; Wed, 10 Apr 2019 04:34:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIdei9DTIpPmHyc8050zrs6u0biVPsHsn+2zvVJg+XRwlYBW123HP7JZ8ZwTxozN1eHrRO X-Received: by 2002:a17:902:407:: with SMTP id 7mr43922796ple.62.1554896069572; Wed, 10 Apr 2019 04:34:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554896069; cv=none; d=google.com; s=arc-20160816; b=wnTzRs7xEa5hIt5gFG41JCbOZIgCeDVmsc0E182oNngoT4xVNUQgsQGrXSrZvb3x/A RPOyLG6/iyPOwoqO1exOhPbvsrE1r13ZUpjQniUQVUtRf7JiAz448I9nXvt79Z42x7Yw HatfflekebvCbHejFfW6XemHXGwJRXMKOU+Bb+mBZrOv1duUKkQRflvQiSmRp3FpDUee HUjZ4z2aTYif4J8GbiAHhCAvjq1JkKvFI2t2nnVfRCK2Jn0SABV9H+HnAIuKpztxyXTR 9hpBkkJ+8qwEaZn21eEu+0Guq65wQNdzlOSyDBkBGLZd+KOYhjWHoXxQMCdCLfYbOtGY VPww== 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=ZGdZQ+9hADrmT6ZpLVAHUoI2ysKIuAev9cHH0ZgaqzU=; b=shkO8iSBdpThkXB31+3QGs6fASRbyAvbHJhRHHyNJuCLeQQK4N8qzOM/J3b+2msT4R 0XxYBJYIBhdM5LLWZT7pHuNwl69/BLpnHem5BcnqOQOi/qLeKOwcEe+Xr6FY3ProwrTq Oy0JO+rJnb3IT6rgD4cEc3g5psWdEvi83lHYwR3IINrYDojxqOqDlrSnutN4RDoHaLUv H2u8C31JorWQNyWyHW0VNRZZQ52eXAMOi4EZ9EJRlrSg63ole+pVCH44EZr+GxGoTcpd laDtL8slLru19jpVsAD+wxKh9MCQyxkmrWbnJMp8WyMQ4WpnrYO1FO9pGlu0M704wtla xfGQ== 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 i9si21267253pgk.207.2019.04.10.04.34.14; Wed, 10 Apr 2019 04:34:29 -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 S1731029AbfDJL3d (ORCPT + 99 others); Wed, 10 Apr 2019 07:29:33 -0400 Received: from mga05.intel.com ([192.55.52.43]:38838 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727337AbfDJL3d (ORCPT ); Wed, 10 Apr 2019 07:29:33 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 04:29:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="335491297" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.189]) by fmsmga006.fm.intel.com with ESMTP; 10 Apr 2019 04:29:28 -0700 Date: Wed, 10 Apr 2019 14:29:27 +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: <20190410112927.GA6586@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190406153047.GF2935@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 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. /Jarkko