From: Jarkko Sakkinen <jarkko@kernel.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-integrity@vger.kernel.org,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: tpm: fix build break in tpm-chip.c caused by AMD fTPM quirk
Date: Mon, 20 Mar 2023 15:37:56 +0200 [thread overview]
Message-ID: <20230320133756.owgccfew4qahw4zv@kernel.org> (raw)
In-Reply-To: <de3ee520780be213c421685805c751dcda0754df.camel@HansenPartnership.com>
On Mon, Mar 20, 2023 at 07:15:52AM -0400, James Bottomley wrote:
> The test for the AMD fTPM problem, which just went in, actually uses
> the wrong function template for request_locality(). It's missing an
> argument so the build breaks:
>
> drivers/char/tpm/tpm-chip.c:568:8: error: too few arguments to function ‘tpm_request_locality’
> ret = tpm_request_locality(chip);
> ^~~~~~~~~~~~~~~~~~~~
> drivers/char/tpm/tpm-chip.c:43:12: note: declared here
> static int tpm_request_locality(struct tpm_chip *chip, int locality)
> ^~~~~~~~~~~~~~~~~~~~
>
> Fix this by requesting zero locality.
>
> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
> Fixes: f1324bbc4011 ("tpm: disable hwrng for fTPM on some AMD designs")
>
> ---
>
> diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
> index c04d101c7779..fee061780468 100644
> --- a/drivers/char/tpm/tpm-chip.c
> +++ b/drivers/char/tpm/tpm-chip.c
> @@ -565,7 +565,7 @@ static bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
> if (!(chip->flags & TPM_CHIP_FLAG_TPM2))
> return false;
>
> - ret = tpm_request_locality(chip);
> + ret = tpm_request_locality(chip, 0);
> if (ret)
> return false;
>
>
Thank you, I sent a PR for rc4.
BR, Jarkko
prev parent reply other threads:[~2023-03-20 13:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 11:15 tpm: fix build break in tpm-chip.c caused by AMD fTPM quirk James Bottomley
2023-03-20 11:22 ` James Bottomley
2023-03-20 13:47 ` Jarkko Sakkinen
2023-03-23 12:20 ` James Bottomley
2023-03-29 23:52 ` Jarkko Sakkinen
2023-03-20 13:37 ` Jarkko Sakkinen [this message]
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=20230320133756.owgccfew4qahw4zv@kernel.org \
--to=jarkko@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=Jason@zx2c4.com \
--cc=linux-integrity@vger.kernel.org \
--cc=mario.limonciello@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox