Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1296726yba; Sat, 6 Apr 2019 08:31:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyF6ftbKW0VGvvzt6t7MwJ9OIpXGclS5HtXkLgYEVpZqXTgtFHGERlNmjYvE397Ok0Es4xQ X-Received: by 2002:aa7:8494:: with SMTP id u20mr11904674pfn.76.1554564699537; Sat, 06 Apr 2019 08:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554564699; cv=none; d=google.com; s=arc-20160816; b=K64wlszNRSzbPmCR1Kxsz0DeauM7ymfAR0X07dehAqyvPv3qXBIulGQCVfoyThFW37 VLJGE858sJKdAHlQI0jOw7kxJeXKGvS2WwiEtvMStc4sYBdMByFmkfHT/0AJ8PSqDP4E dEpoXPStwbSo4ZyYhyXEeRBovbRR/fXigLZhAhsc/DiFxjy8ZrMMr8d0s4nkF2/gHL2W XlbvVGsTHgkW6ZBNI78Qnw1zzgDhNriEabQ2FWzY+CN/wYCvbHsn75go+Mx9YJiIoN6C UGZZAyzoQSZSegScLV8PvGvs1eRHm1jmV2QnQh66piL1ZoZP1L1ZwtKK71SC4Dr2L7ta 6IcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=69SVdAMKOi54l2cejvIAxS8Ti1tgoy349qwCGdEADyg=; b=enR+ev77o/tPVSxgnKvZH7bZcuyBMCPWXwjxseDUqnEmydSG+9yb40upGeUv2b/Fem 2ql5nfV/Tt0dDcFCME8BFXVFxJXo2rB5WUV76E8HHWNQga8aMgAOLH89R4AzvnwJXPKn WJUVlLGmZ/msahfkNH1R9MMbBGwRb7PhhAnDp1cxy+uAlz5Y2Am7JZgPTdqCUej2cVAr Y/2nlA9C7kJFCuLlDvLLc6TacHSvFwmx+WJx2nUcd+E0/07I7EpxPXhQbXdZK4O5ANh1 Ex0tn6mz3twCBeCDTryrFmvyJLQldH/GxVKb0ikHpl2erpMCGUuz2SsORD7XqSxFJ0H6 GRgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oeFzRYXS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i69si18375450pge.560.2019.04.06.08.31.24; Sat, 06 Apr 2019 08:31:39 -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; dkim=pass header.i=@kernel.org header.s=default header.b=oeFzRYXS; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726501AbfDFPat (ORCPT + 99 others); Sat, 6 Apr 2019 11:30:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:36182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbfDFPat (ORCPT ); Sat, 6 Apr 2019 11:30:49 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 923482083E; Sat, 6 Apr 2019 15:30:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554564648; bh=69SVdAMKOi54l2cejvIAxS8Ti1tgoy349qwCGdEADyg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oeFzRYXS6rbDeKWUWSPeNobw7CX8oIQmanT91oatL2x/a9tZIbqDjEJSzRG3b8WSy p+ub6QgapqBNXZFM0qisU91TZsTW4eG1s4vbwZede2BsIGrSW0fNFqUtPTOuabXLpg fEsI42/MKSuqh+gg3WDbrkDOASOtStlRutrfY1AI= Date: Sat, 6 Apr 2019 11:30:47 -0400 From: Sasha Levin To: Jarkko Sakkinen 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: <20190406153047.GF2935@sasha-vm> References: <20190402193316.15144-1-sashal@kernel.org> <20190402193316.15144-2-sashal@kernel.org> <20190403181827.GB17006@linux.intel.com> <20190403182728.GA17451@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190403182728.GA17451@linux.intel.com> 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 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. >The commit message should absolutely better explain what is going on >and preferably there should be some more broad documentation in >Documentation/security/tpm. The code itself is just a small shim between the firmware TPM and the kernel's TPM interface. There's really not much else to expand on in the commit log. I'll add some background to Documentation/security/tpm. >Now this is just a random code dump and nothing else. It pretty much is, but that's because this is just a "stupid" shim, there heavy lifting is done outside of the kernel. >Also, I have zero idea how to test this. Any recommendations on ARM >board that can be easily used to test custom TZ applications would be >nice. We are testing this on a Broadcom's Stingray SST100 board, and if you have one we can help out with setting up a test environment. Otherwise, we haven't really tried it on other boards. -- Thanks, Sasha