mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Limonciello, Mario" <mario.limonciello@amd.com>
To: Jarkko Sakkinen <jarkko@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Daniil Stas <daniil.stas@posteo.net>
Cc: James.Bottomley@hansenpartnership.com, Jason@zx2c4.com,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
	regressions@leemhuis.info, stable@vger.kernel.org
Subject: Re: [PATCH 1/1] tpm: disable hwrng for fTPM on some AMD designs
Date: Mon, 31 Jul 2023 16:44:06 -0500	[thread overview]
Message-ID: <f9ae26a4-25f6-bf19-9d20-e28eb22c04ee@amd.com> (raw)
In-Reply-To: <CUGAV1Y993FB.1O2Q691015Z2C@seitikki>



On 7/31/2023 5:53 AM, Jarkko Sakkinen wrote:
> On Fri Jul 28, 2023 at 8:41 PM UTC, Linus Torvalds wrote:
>> On Thu, 27 Jul 2023 at 10:05, Daniil Stas <daniil.stas@posteo.net> wrote:
>>>
>>> Here is the bug report I created:
>>> https://bugzilla.kernel.org/show_bug.cgi?id=217719
>>
>> Let's just disable the stupid fTPM hwrnd thing.
>>
>> Maybe use it for the boot-time "gather entropy from different
>> sources", but clearly it should *not* be used at runtime.
>>
>> Why would anybody use that crud when any machine that has it
>> supposedly fixed (which apparently didn't turn out to be true after
>> all) would also have the CPU rdrand instruction that doesn't have the
>> problem?
>>
>> If you don't trust the CPU rdrand implementation (and that has had
>> bugs too - see clear_rdrand_cpuid_bit() and x86_init_rdrand()), why
>> would you trust the fTPM version that has caused even *more* problems?
>>
>> So I don't see any downside to just saying "that fTPM thing is not
>> working". Even if it ends up working in the future, there are
>> alternatives that aren't any worse.
>>
>>                   Linus
> 
> I quickly carved up a patch (attached), which is only compile tested
> because I do not have any AMD hardware at hand.
> 
> BR, Jarkko
> 

I'll get some testing done on this patch with some AMD reference 
hardware, but off the cuff comments:

1) It needs to target older stable than 6.3 because 6.1-rc1 is when 
b006c439d58d was introduced and 6.1.19 backported f1324bbc4 as dc64dc4c8.

2) Add a Link tag for [1]

3) The fix for [2] is lost.  The one that landed upstream was
ecff6813d2bc ("tpm: return false from tpm_amd_is_rng_defective on 
non-x86 platforms").

I sent another one that checked for chip->ops [3], but this wasn't 
picked up.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=217719
[2] 
https://lore.kernel.org/lkml/99B81401-DB46-49B9-B321-CF832B50CAC3@linux.ibm.com/ 

[3] 
https://lore.kernel.org/lkml/20230623030427.908-1-mario.limonciello@amd.com/

  parent reply	other threads:[~2023-07-31 21:44 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 20:19 [PATCH 0/1] Avoid triggering an fTPM bug from kernel Mario Limonciello
2023-02-14 20:19 ` [PATCH 1/1] tpm: disable hwrng for fTPM on some AMD designs Mario Limonciello
2023-02-17 15:18   ` Thorsten Leemhuis
2023-02-17 22:35     ` Jarkko Sakkinen
2023-02-18  2:25       ` Limonciello, Mario
2023-02-21 22:53         ` Jarkko Sakkinen
2023-02-21 23:10           ` Limonciello, Mario
2023-02-27 10:57             ` Thorsten Leemhuis
2023-02-27 11:14               ` Jarkko Sakkinen
2023-02-27 11:16                 ` Jarkko Sakkinen
2023-02-17 22:05   ` Jarkko Sakkinen
2023-07-27 15:38   ` Daniil Stas
2023-07-27 15:42     ` Mario Limonciello
2023-07-27 16:39       ` Daniil Stas
2023-07-27 16:41         ` Mario Limonciello
2023-07-27 16:50           ` Daniil Stas
2023-07-27 16:51             ` Mario Limonciello
2023-07-27 17:05               ` Daniil Stas
2023-07-28 20:41                 ` Linus Torvalds
2023-07-28 21:01                   ` Limonciello, Mario
2023-07-28 21:38                     ` Linus Torvalds
2023-07-28 21:47                       ` Limonciello, Mario
     [not found]                   ` <CUGAV1Y993FB.1O2Q691015Z2C@seitikki>
2023-07-31 19:05                     ` Linus Torvalds
2023-07-31 19:18                       ` Limonciello, Mario
2023-07-31 19:30                         ` Linus Torvalds
2023-07-31 21:57                           ` Limonciello, Mario
2023-07-31 23:28                             ` Linus Torvalds
2023-07-31 23:40                               ` Jason A. Donenfeld
2023-08-01  3:04                                 ` Mario Limonciello
2023-08-01 11:36                                   ` Mateusz Schyboll
2023-08-01 18:52                                   ` Jarkko Sakkinen
2023-08-01 18:55                                     ` Jarkko Sakkinen
2023-08-01 18:28                       ` Jarkko Sakkinen
2023-08-01 18:42                         ` Linus Torvalds
2023-08-01 18:51                           ` Mario Limonciello
2023-08-01 19:09                           ` Jarkko Sakkinen
2023-08-02 23:13                             ` Jerry Snitselaar
2023-08-03  0:34                               ` Stefan Berger
2023-07-31 21:44                     ` Limonciello, Mario [this message]
2023-07-28 19:30     ` Jarkko Sakkinen
2023-07-28 20:18       ` Daniil Stas
2023-07-31 10:14         ` Jarkko Sakkinen
2023-07-31 10:28           ` Daniil Stas
2023-07-31 11:07             ` Jarkko Sakkinen

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=f9ae26a4-25f6-bf19-9d20-e28eb22c04ee@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=Jason@zx2c4.com \
    --cc=daniil.stas@posteo.net \
    --cc=jarkko@kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@leemhuis.info \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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

Powered by JetHome