From: Jarkko Sakkinen <jarkko@kernel.org>
To: "florian.manoel@siemens.com" <florian.manoel@siemens.com>
Cc: "linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
"Fuchs, Andreas" <andreas.fuchs@sit.fraunhofer.de>,
"Peter.Huewe@infineon.com" <Peter.Huewe@infineon.com>,
"joshz@google.com" <joshz@google.com>
Subject: Re: TPM V2: kernel panic on linux reboot
Date: Sat, 30 Jan 2021 01:25:12 +0200 [thread overview]
Message-ID: <YBSZWPNUV2y09Yg0@kernel.org> (raw)
In-Reply-To: <AM0PR10MB25481FFED2CDFBEC5596098F84BB0@AM0PR10MB2548.EURPRD10.PROD.OUTLOOK.COM>
On Wed, Jan 27, 2021 at 02:51:56PM +0000, florian.manoel@siemens.com wrote:
> Hi,
>
> thanks for your support,
> an update on the kernel panic I am experiencing while trying to set up a TPM V2 on an ARM64 NXP LS1043a custom board :
> We updated the kernel from 4.19.144 to 4.19.165, no changes, the panic is still occurring.
>
> I started to debug, and identify what I believe is the point where this kernel panic is triggered:
> '/drivers/char/tpm/tpm-interface.c'
>
> "
> if (chip->ops->clk_enable != NULL)
> chip->ops->clk_enable(chip, true);
> "
BTW, that is quite stupid code from us. In all cases a direct call to
tpm_tis_clkrun_enable() would make a lot more sense. Anyway, this does
not explain the bug. This just hurts my eyes, that's all..
Anyway we, can disclose that function given the IS_ENABLED() check early
on:
static void tpm_tis_clkrun_enable(struct tpm_chip *chip, bool value)
{
struct tpm_tis_data *data = dev_get_drvdata(&chip->dev);
u32 clkrun_val;
if (!IS_ENABLED(CONFIG_X86) || !is_bsw() ||
!data->ilb_base_addr)
return;
I think a safe conclusion to make that chip->ops is NULL, and causes the
panic.
> It looks a lot like an issue that is described here with a TPM 1.2 :
> https://chromium.googlesource.com/chromiumos/third_party/kernel/+/01d1d6e2a1a74b9b8acba7d5eee67fe83e914aa1
I get:
"NOT_FOUND: Requested entity was not found"
Please try out with the mainline kernel. I only now spotted that you are
using a really old kernel. And I have no idea how patched the kernel is.
I misread last time that this happening with the mainline kernel. Debugging
downstream kernel is unfortunately out-of-scope.
When you have test data with the latest unpatched mainline kernel, it makes
sense to look this further.
/Jarkko
next prev parent reply other threads:[~2021-01-29 23:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <VI1PR10MB2559EB47FE26FA85EB4B4D4484A70@VI1PR10MB2559.EURPRD10.PROD.OUTLOOK.COM>
2021-01-15 7:17 ` AW: TPM V2: kernel panic on linux reboot florian.manoel
2021-01-17 18:35 ` Jarkko Sakkinen
2021-01-27 14:51 ` AW: " florian.manoel
2021-01-29 23:25 ` Jarkko Sakkinen [this message]
2021-02-12 7:20 ` florian.manoel
2021-02-12 23:46 ` 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=YBSZWPNUV2y09Yg0@kernel.org \
--to=jarkko@kernel.org \
--cc=Peter.Huewe@infineon.com \
--cc=andreas.fuchs@sit.fraunhofer.de \
--cc=florian.manoel@siemens.com \
--cc=joshz@google.com \
--cc=linux-integrity@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).