public inbox for linux-integrity@vger.kernel.org
 help / color / mirror / Atom feed
* REGRESSION WITH BISECT: v6.5-rc6 TPM patch breaks S3 on some Intel systems
@ 2023-08-17 21:09 Todd Brandt
  2023-08-17 21:47 ` Jarkko Sakkinen
  2023-08-18  0:10 ` Bagas Sanjaya
  0 siblings, 2 replies; 16+ messages in thread
From: Todd Brandt @ 2023-08-17 21:09 UTC (permalink / raw)
  To: mario.limonciello, linux-integrity
  Cc: linux-kernel, len.brown, charles.d.prestopine, rafael.j.wysocki

While testing S3 on 6.5.0-rc6 we've found that 5 systems are seeing a
crash and reboot situation when S3 suspend is initiated. To reproduce
it, this call is all that's required "sudo sleepgraph -m mem -rtcwake
15".

I’ve created a Bugzilla to track this issue here:
https://bugzilla.kernel.org/show_bug.cgi?id=217804

I've bisected the issue to this patch:

commit 554b841d470338a3b1d6335b14ee1cd0c8f5d754
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Wed Aug 2 07:25:33 2023 -0500

    tpm: Disable RNG for all AMD fTPMs
    
    The TPM RNG functionality is not necessary for entropy when the CPU
    already supports the RDRAND instruction. The TPM RNG functionality
    was previously disabled on a subset of AMD fTPM series, but reports
    continue to show problems on some systems causing stutter root
caused
    to TPM RNG functionality.
    
    Expand disabling TPM RNG use for all AMD fTPMs whether they have
versions
    that claim to have fixed or not. To accomplish this, move the
detection
    into part of the TPM CRB registration and add a flag indicating
that
    the TPM should opt-out of registration to hwrng.

By reverting this patch in 6.5.0-rc6 the problem goes away, so it's
pretty clear that this commit is at fault. I've done further debugging
and I've found that if I simply comment out these lines in 6.5.0-rc6
the problem goes away. So the "crb_check_flags" call is the root cause.

diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index 9eb1a1859012..20ce8102e6bd 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -826,9 +826,9 @@ static int crb_acpi_add(struct acpi_device *device)
        if (rc)
                goto out;
 
-       rc = crb_check_flags(chip);
-       if (rc)
-               goto out;
+//     rc = crb_check_flags(chip);
+//     if (rc)
+//             goto out;
 
        rc = tpm_chip_register(chip);


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-09-04 22:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 21:09 REGRESSION WITH BISECT: v6.5-rc6 TPM patch breaks S3 on some Intel systems Todd Brandt
2023-08-17 21:47 ` Jarkko Sakkinen
2023-08-17 22:25   ` Todd Brandt
2023-08-17 22:33     ` Jarkko Sakkinen
2023-08-18  1:58       ` Limonciello, Mario
2023-08-18 17:00         ` Jarkko Sakkinen
2023-08-18 17:21           ` Mario Limonciello
     [not found]             ` <CUVV2MQRCGET.2U22LFQPX1J3G@suppilovahvero>
2023-08-18 17:57               ` Mario Limonciello
2023-08-18 18:07                 ` Jarkko Sakkinen
2023-08-18 18:11                   ` Mario Limonciello
2023-08-18 20:08                     ` Todd Brandt
2023-08-18 21:39                     ` Todd Brandt
2023-09-02  2:47                       ` Tyler Stachecki
2023-09-04 22:30                         ` Jarkko Sakkinen
2023-08-18 16:51       ` Jarkko Sakkinen
2023-08-18  0:10 ` Bagas Sanjaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox