All of lore.kernel.org
 help / color / mirror / Atom feed
From: Todd Brandt <todd.e.brandt@linux.intel.com>
To: mario.limonciello@amd.com, linux-integrity@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, len.brown@intel.com,
	charles.d.prestopine@intel.com, rafael.j.wysocki@intel.com
Subject: REGRESSION WITH BISECT: v6.5-rc6 TPM patch breaks S3 on some Intel systems
Date: Thu, 17 Aug 2023 14:09:00 -0700	[thread overview]
Message-ID: <485e8740385239b56753ce01d8995f01f84a68e5.camel@linux.intel.com> (raw)

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);


             reply	other threads:[~2023-08-17 21:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 21:09 Todd Brandt [this message]
2023-08-17 21:47 ` REGRESSION WITH BISECT: v6.5-rc6 TPM patch breaks S3 on some Intel systems 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
2023-08-27 13:52   ` Linux regression tracking #update (Thorsten Leemhuis)

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=485e8740385239b56753ce01d8995f01f84a68e5.camel@linux.intel.com \
    --to=todd.e.brandt@linux.intel.com \
    --cc=charles.d.prestopine@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=rafael.j.wysocki@intel.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.