linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thirupathaiah Annapureddy <thiruan@microsoft.com>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Sasha Levin <sashal@kernel.org>,
	"peterhuewe@gmx.de" <peterhuewe@gmx.de>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>, "corbet@lwn.net" <corbet@lwn.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	Microsoft Linux Kernel List <linux-kernel@microsoft.com>,
	"Bryan Kelly (CSI)" <bryankel@microsoft.com>,
	"tee-dev@lists.linaro.org" <tee-dev@lists.linaro.org>,
	"sumit.garg@linaro.org" <sumit.garg@linaro.org>,
	"rdunlap@infradead.org" <rdunlap@infradead.org>
Subject: RE: [PATCH v7 1/2] fTPM: firmware TPM running in TEE
Date: Tue, 2 Jul 2019 16:54:49 +0000	[thread overview]
Message-ID: <CY4PR21MB0279B99FB0097309ADE83809BCF80@CY4PR21MB0279.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20190702142109.GA32069@apalos>

Hi Ilias,

First of all, Thanks a lot for trying to test the driver. 

> -----Original Message-----
> From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Sent: Tuesday, July 2, 2019 7:21 AM
> To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Cc: Sasha Levin <sashal@kernel.org>; peterhuewe@gmx.de; jgg@ziepe.ca;
> corbet@lwn.net; linux-kernel@vger.kernel.org; linux-doc@vger.kernel.org;
> linux-integrity@vger.kernel.org; Microsoft Linux Kernel List <linux-
> kernel@microsoft.com>; Thirupathaiah Annapureddy <thiruan@microsoft.com>;
> Bryan Kelly (CSI) <bryankel@microsoft.com>; tee-dev@lists.linaro.org;
> sumit.garg@linaro.org; rdunlap@infradead.org
> Subject: Re: [PATCH v7 1/2] fTPM: firmware TPM running in TEE
> 
> Hi,
> 
> > On Thu, 2019-06-27 at 16:30 +0300, Ilias Apalodimas wrote:
> > > is really useful. I don't have hardware to test this at the moment, but
> once i
> > > get it, i'll give it a spin.
> >
> > Thank you for responding, really appreciate it.
> >
> No worries
> > Please note, however, that I already did my v5.3 PR so there is a lot of
> > time to give it a spin. In all cases, we will find a way to put this to
> > my v5.4 PR. I don't see any reason why not.
> >
> > As soon as the cosmetic stuff is fixed that I remarked in v7 I'm ready
> > to take this to my tree and after that soonish make it available on
> > linux-next.
> I managed to do some quick testing in QEMU.
> Everything works fine when i build this as a module (using IBM's TPM 2.0
> TSS)
> 
> - As module
> # insmod /lib/modules/5.2.0-rc1/kernel/drivers/char/tpm/tpm_ftpm_tee.ko
> # getrandom -by 8
> randomBytes length 8
> 23 b9 3d c3 90 13 d9 6b
> 
> - Built-in
> # dmesg | grep optee
> ftpm-tee firmware:optee: ftpm_tee_probe:tee_client_open_session failed,
> err=ffff0008
This (0xffff0008) translates to TEE_ERROR_ITEM_NOT_FOUND.

Where is fTPM TA located in the your test setup? 
Is it stitched into TEE binary as an EARLY_TA or 
Is it expected to be loaded during run-time with the help of user mode OP-TEE supplicant?

My guess is that you are trying to load fTPM TA through user mode OP-TEE supplicant. 
Can you confirm? 
If that is the true, 
- In the case of driver built as a module (CONFIG_TCG_FTPM_TEE=m), this is works fine 
as user mode supplicant is ready. 
- In the built-in case (CONFIG_TCG_FTPM_TEE=y), 
This would result in the above error 0xffff0008 as TEE is unable to find fTPM TA. 

The expectation is that fTPM TA is built as an EARLY_TA (in BL32) so that
U-boot and Linux driver stacks work seamlessly without dependency on supplicant.  


> ftpm-tee: probe of firmware:optee failed with error -22
> # getrandom -by 8
> random: fast init done
> urandom_read: 2 callbacks suppressed
> random: getrandom: uninitialized urandom read (32 bytes read)
> TSS_Dev_Open: Error opening /dev/tpm0
> getrandom: failed, rc 000b0008
> TSS_RC_NO_CONNECTION - Failure connecting to lower layer
> 
> Am i missing anything?
> 
> Thanks
> /Ilias

  reply	other threads:[~2019-07-02 16:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 20:13 [PATCH v7 0/2] fTPM: firmware TPM running in TEE Sasha Levin
2019-06-25 20:13 ` [PATCH v7 1/2] " Sasha Levin
2019-06-26 23:31   ` Jarkko Sakkinen
2019-06-26 23:56     ` Sasha Levin
2019-06-27 13:17       ` Jarkko Sakkinen
2019-06-27 13:19         ` Jarkko Sakkinen
2019-06-27 13:30         ` Ilias Apalodimas
2019-06-27 16:32           ` Jarkko Sakkinen
2019-07-02 14:21             ` Ilias Apalodimas
2019-07-02 16:54               ` Thirupathaiah Annapureddy [this message]
2019-07-03  6:58                 ` Ilias Apalodimas
2019-07-03  8:12                   ` Ilias Apalodimas
2019-07-03 10:03                     ` Sumit Garg
2019-07-03 14:16                       ` Joakim Bech
2019-07-04  6:28                     ` Thirupathaiah Annapureddy
2019-07-04 18:11                       ` Ilias Apalodimas
2019-07-05  2:40                         ` Thirupathaiah Annapureddy
2019-07-10 12:13                           ` Ilias Apalodimas
2019-06-28  5:50         ` Sumit Garg
2019-06-29 15:01     ` Sasha Levin
2019-07-04  9:20       ` Jarkko Sakkinen
2019-06-25 20:13 ` [PATCH v7 2/2] fTPM: add documentation for ftpm driver Sasha Levin
2019-06-25 23:13   ` Randy Dunlap
2019-06-26 23:34   ` Jarkko Sakkinen
2019-06-26 23:59     ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CY4PR21MB0279B99FB0097309ADE83809BCF80@CY4PR21MB0279.namprd21.prod.outlook.com \
    --to=thiruan@microsoft.com \
    --cc=bryankel@microsoft.com \
    --cc=corbet@lwn.net \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=rdunlap@infradead.org \
    --cc=sashal@kernel.org \
    --cc=sumit.garg@linaro.org \
    --cc=tee-dev@lists.linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).