Re: tpm: fix build break in tpm-chip.c caused by AMD fTPM quirk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx>
> 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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux