[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFA6WYP4Tm-K3PxvbQCqeOka6mvq3ebYYjKp0fjga9mV=OMUQQ@mail.gmail.com>
Date: Fri, 14 Jun 2019 16:11:11 +0530
From: Sumit Garg <sumit.garg@...aro.org>
To: Sasha Levin <sashal@...nel.org>
Cc: peterhuewe@....de,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
jgg@...pe.ca, corbet@....net,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-doc@...r.kernel.org, linux-integrity@...r.kernel.org,
Microsoft Linux Kernel List <linux-kernel@...rosoft.com>,
Thirupathaiah Annapureddy <thiruan@...rosoft.com>,
"Bryan Kelly (CSI)" <bryankel@...rosoft.com>,
tee-dev@...ts.linaro.org
Subject: Re: [PATCH v4 1/2] fTPM: firmware TPM running in TEE
On Wed, 5 Jun 2019 at 16:39, Sumit Garg <sumit.garg@...aro.org> wrote:
>
> On Wed, 5 Jun 2019 at 01:39, Sasha Levin <sashal@...nel.org> wrote:
> >
> > On Tue, Jun 04, 2019 at 11:45:52AM +0530, Sumit Garg wrote:
> > >On Thu, 30 May 2019 at 20:58, Sasha Levin <sashal@...nel.org> wrote:
> > >> + /* Open context with TEE driver */
> > >> + pvt_data->ctx = tee_client_open_context(NULL, ftpm_tee_match, NULL,
> > >> + NULL);
> > >> + if (IS_ERR(pvt_data->ctx)) {
> > >> + dev_err(dev, "%s:tee_client_open_context failed\n", __func__);
> > >
> > >Is this well tested? I see this misleading error multiple times as
> > >follows although TEE driver works pretty well.
> >
> > Yes, this was all functionally tested.
>
> Can you share your build instructions and testing approach?
>
> >
> > Why is this error message misleading? I'd be happy to fix it.
>
But still this message should be updated to represent correct status.
Maybe something like:
dev_warn(dev, "waiting for OP-TEE to be alive\n");
> IIUC, here you are trying to resolve dependency with OP-TEE driver
> using "-EPROBE_DEFER". So user shouldn't be prompted with error
> messages until OP-TEE driver comes up.
>
> BTW, for me this OP-TEE driver dependency seems not to work, boot is
> simply stuck waiting for device. Probably the reason being this fTPM
> driver is a platform driver and OP-TEE NOT a platform driver.
>
Apologies for the noise here. It works as expected.
-Sumit
> >
> > >Module built with "CONFIG_TCG_FTPM_TEE=y"
> > >
> > >[ 1.436878] ftpm-tee tpm@0: ftpm_tee_probe:tee_client_open_context failed
> > >[ 1.509471] ftpm-tee tpm@0: ftpm_tee_probe:tee_client_open_context failed
> > >[ 1.517268] ftpm-tee tpm@0: ftpm_tee_probe:tee_client_open_context failed
> > >[ 1.525596] ftpm-tee tpm@0: ftpm_tee_probe:tee_client_open_context failed
> >
> > Does the TEE have the fTPM implementation and such? Could you provide
> > details about your testing environment (hardware, fTPM verions, etc)?
> >
>
> I just did a sanity check on my arm64 machine (Developerbox), just
> adding following DT node and enabled CONFIG_TCG_FTPM_TEE=y:
>
> + tpm@0 {
> + compatible = "microsoft,ftpm";
> + };
>
> Basically with no fTPM TA, I expected the driver to fail during
> "tee_client_open_session()" call with TA not found error and boot
> should continue. But it fails during "tee_client_open_context()" which
> opens a context with OP-TEE driver and has nothing to do with fTPM TA.
>
> -Sumit
>
> > --
> > Thanks,
> > Sasha
Powered by blists - more mailing lists