Bug 2014462

Summary: Kernel panic in tpm_tis_spi driver on reboot (device release)
Product: [Fedora] Fedora Reporter: a.wellbrock
Component: kernelAssignee: Peter Robinson <pbrobinson>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 34CC: acaringi, adscvr, airlied, alciregi, bskeggs, hdegoede, jarodwilson, jeremy, jglisse, jonathan, josef, kernel-maint, lgoncalv, linville, masami256, mchehab, pbrobinson, ptalbert, pwhalen, steved
Target Milestone: ---   
Target Release: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-08 06:27:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Screenshot of kernel panic contents none

Description a.wellbrock 2021-10-15 10:06:29 UTC
Created attachment 1833352 [details]
Screenshot of kernel panic contents

1. Please describe the problem:

When using a TPM2 chip via SPI on a Raspberry Pi 4 or CM4 using the tpm-slb9670 overlay which activates the tpm_tis_spi driver the kernel will panic on reboot locking it into this state. Only a hardware reset is able to recover the device (or using sysctl kernel.panic=SEC to just continue after the kernel panic happens).

2. What is the Version-Release number of the kernel:

Linux fedora 5.13.5-200.fc34.aarch64 #1 SMP Sun Jul 25 16:03:46 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

I don't know if it worked prior. First started to use and notice this on F34.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

* flash a fresh F34 image using arm-image-installer onto an SD-Card targeted for RPI4 or onto a CM4
* activate the tpm-slb9670 SPI interface (see below)

To activate the SPI tpm interface add the following lines to /boot/efi/config.txt:

dtparam=spi=on
dtoverlay=tpm-slb9670

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

Yes, it also occurs on the latest rawhide kernel F36 5.15

6. Are you running any modules that not shipped with directly Fedora's kernel?:

No, no extra modules.

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

The panic seems to occur in tpm_chip_start, tpm_chip_unregister tpm_tis_spi_remove, spi_remove.

Since the panic is only printed on the screen and not the log (journald is already shut down at this point) I attach a screenshot of the output.

Comment 1 Peter Robinson 2021-10-15 11:10:00 UTC
Known issue, upstream are fighting over what the actual problem is:
https://www.spinics.net/lists/linux-spi/msg29163.html

Comment 2 Ben Cotton 2022-05-12 16:54:43 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Ben Cotton 2022-06-08 06:27:42 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.