All of lore.kernel.org
 help / color / mirror / Atom feed
From: hamza@hpe.com
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Hao Wu <hao.wu@rubrik.com>, Ken Goldman <kgold@linux.ibm.com>,
	<linux-integrity@vger.kernel.org>,
	Seungyeop Han <seungyeop.han@rubrik.com>,
	Shrihari Kalkar <shrihari.kalkar@rubrik.com>
Subject: Re: [Bug Report] Kernel 4.14+ TPM Driver Bug for Atmel TPM Chip
Date: Sat, 12 Sep 2020 15:17:26 +0100	[thread overview]
Message-ID: <2DUJGQ.3X1TLM389WIN@hpe.com> (raw)
In-Reply-To: <5a62669c-59e2-861a-f851-bd28e5e84e36@molgen.mpg.de>

Hello everyone,

Dear Hao,

The first aim of the patch you mentioned is not to shorten TPM timings, 
as no
timing is changed at all on this patch, but to count time more 
accurately.

If your TPM needs more time to perform a specific operation, it has 
nothing to
do with this patch, but rather with its specified timings in the 
kernel. The
timings for your Atmel TPM were certainly wrong before 4.14 to begin 
with, they
were not counted accurately and your TPM working was potentially a 
"positive"
side effect of the imprecise time counting (ie non-specified delays 
were added
every time msleep was used instead of usleep_range).
TPM polling should not be affected because we use a different way to 
count
timings in the kernel.

If you see issues with your Atmel TPM, I'd suggest to make the changes 
in the
tpm_atmel code only (tpm_infineon would be a suitable example to look 
at) and
discuss the timing values with Atmel TPMs experts, but reverting this 
patch and
affecting all the other TPMs seems like a misunderstanding.

Thanks,
Hamza ATTAK.

On Sat, Sep 12, 2020 at 10:14, Paul Menzel <pmenzel@molgen.mpg.de> 
wrote:
> Dear Hao,
> 
> 
> Thank you for the reply.
> 
> Am 12.09.20 um 10:10 schrieb Hao Wu:
> 
>> Thanks for quick responses over this report.
> 
> Thank you for the quick follow-up.
> 
>>> Hao, I wouldn’t expect a longer timeout causing the TPM to be
>>> queried less frequently, but I do not know the code well.
>> From our understanding, the TPM queries might be retried due to some
>> reason, increase timeout 3x would lower the query frequency to 1/3.
>> The explanation might be wrong, but the fact looks like the timeout
>> matters.  Unfortunately, engineers from Rubrik are not experts over
>> the TPM driver code neither :(
>> 
>>>> Be careful about making this a global change.  It could reduce
>>>> the TPM performance by 3x. We don't want to affect all TPMs to
>>>> fix a bug in an old TPM 1.2 chip from one vendor.
>>> 
>>> Linux has a no regression policy, so the performance penalty
>>> wouldn’t matter. Unfortunately, the regression was only noticed
>>> several years after being introduced in Linux v4.14-rc2.
>> 
>> So does that mean we are good to apply the global change ? Or we need
>> to discuss about the actual fix further?
> To get a fix into the stable series, it first needs to be applied to 
> the master branch. I guess you tested also with Linux master, right?
> 
> Please add the explanation from your email to Greg into the git 
> commit message, format the patch with `git format-patch -1 -o 
> outgoing` and send it with `git send-email outgoing/*` to the 
> addresses listed for the subsystem in `MAINTAINERS` and the people 
> listed in the commit introducing the regression.
> 
> Then it can be properly reviewed and discussed.
> 
> 
> Kind regards,
> 
> Paul



  reply	other threads:[~2020-09-12 14:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9173F912-F682-44CC-8408-565A6C675749@rubrik.com>
2020-09-11  4:18 ` [Bug Report] Kernel 4.14+ TPM Driver Bug for Atmel TPM Chip Greg KH
2020-09-11 19:35   ` Ken Goldman
2020-09-12  7:37     ` Paul Menzel
2020-09-12  8:13       ` Hao Wu
     [not found]       ` <B003F2A9-2DF5-4633-91C4-FD6B8A3353ED@rubrik.com>
2020-09-12  8:14         ` Paul Menzel
2020-09-12 14:17           ` hamza [this message]
2020-09-13  4:51             ` Hao Wu
2020-09-13  6:38               ` Hao Wu

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=2DUJGQ.3X1TLM389WIN@hpe.com \
    --to=hamza@hpe.com \
    --cc=hao.wu@rubrik.com \
    --cc=kgold@linux.ibm.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=seungyeop.han@rubrik.com \
    --cc=shrihari.kalkar@rubrik.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.