Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-18 Thread Herbert Xu
On Sat, May 18, 2024 at 01:56:44PM +0300, Jarkko Sakkinen wrote: > > --- a/drivers/char/tpm/Kconfig > +++ b/drivers/char/tpm/Kconfig > @@ -36,6 +36,8 @@ config TCG_TPM2_HMAC > bool "Use HMAC and encrypted transactions on the TPM bus" > default y > + select CRYPTO_DRBG >

Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-18 Thread Jarkko Sakkinen
On Sat May 18, 2024 at 7:31 AM EEST, Eric Biggers wrote: > This is "normal" behavior when the crypto API instantiates a template: > > 1. drbg.c asks for "hmac(sha512)" > > 2. The crypto API looks for a direct implementation of "hmac(sha512)". >This includes requesting a module with

Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-17 Thread Eric Biggers
On Fri, May 17, 2024 at 07:48:48PM +0300, Jarkko Sakkinen wrote: > On Fri May 17, 2024 at 7:22 PM EEST, Nícolas F. R. A. Prado wrote: > > On Fri, May 17, 2024 at 07:25:40AM -0700, James Bottomley wrote: > > > On Fri, 2024-05-17 at 15:43 +0200, Ard Biesheuvel wrote: > > > > On Fri, 17 May 2024 at 15

Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-17 Thread Jarkko Sakkinen
On Fri May 17, 2024 at 7:22 PM EEST, Nícolas F. R. A. Prado wrote: > On Fri, May 17, 2024 at 07:25:40AM -0700, James Bottomley wrote: > > On Fri, 2024-05-17 at 15:43 +0200, Ard Biesheuvel wrote: > > > On Fri, 17 May 2024 at 15:35, James Bottomley > > > wrote: > > [...] > > > > Thanks for the analy

Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-17 Thread Nícolas F . R . A . Prado
On Fri, May 17, 2024 at 07:25:40AM -0700, James Bottomley wrote: > On Fri, 2024-05-17 at 15:43 +0200, Ard Biesheuvel wrote: > > On Fri, 17 May 2024 at 15:35, James Bottomley > > wrote: > [...] > > > Thanks for the analysis.  If I look at how CRYPTO_ECC does it, that > > > selects CRYPTO_RNG_DEFAUL

Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-17 Thread James Bottomley
On Fri, 2024-05-17 at 15:43 +0200, Ard Biesheuvel wrote: > On Fri, 17 May 2024 at 15:35, James Bottomley > wrote: [...] > > Thanks for the analysis.  If I look at how CRYPTO_ECC does it, that > > selects CRYPTO_RNG_DEFAULT which pulls in CRYPTO_DRBG, so the fix > > would be the attached.  Does tha

Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-17 Thread Ard Biesheuvel
On Fri, 17 May 2024 at 15:35, James Bottomley wrote: > > On Fri, 2024-05-17 at 09:20 +0200, Ard Biesheuvel wrote: > > On Fri, 17 May 2024 at 03:59, James Bottomley > > wrote: > > > > > > On Thu, 2024-05-16 at 20:25 -0400, Nícolas F. R. A. Prado wrote: > > ... > > > > KernelCI has identified a new

Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-17 Thread James Bottomley
On Fri, 2024-05-17 at 09:20 +0200, Ard Biesheuvel wrote: > On Fri, 17 May 2024 at 03:59, James Bottomley > wrote: > > > > On Thu, 2024-05-16 at 20:25 -0400, Nícolas F. R. A. Prado wrote: > ... > > > KernelCI has identified a new warning and I tracked it down to > > > this > > > commit. It > > > w

Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-17 Thread Jarkko Sakkinen
On Fri May 17, 2024 at 10:20 AM EEST, Ard Biesheuvel wrote: > On Fri, 17 May 2024 at 03:59, James Bottomley > wrote: > > > > On Thu, 2024-05-16 at 20:25 -0400, Nícolas F. R. A. Prado wrote: > ... > > > KernelCI has identified a new warning and I tracked it down to this > > > commit. It > > > was o

Re: [PATCH v8 18/22] tpm: add session encryption protection to tpm2_get_random()

2024-05-17 Thread Ard Biesheuvel
On Fri, 17 May 2024 at 03:59, James Bottomley wrote: > > On Thu, 2024-05-16 at 20:25 -0400, Nícolas F. R. A. Prado wrote: ... > > KernelCI has identified a new warning and I tracked it down to this > > commit. It > > was observed on the following platforms: > > * mt8183-kukui-jacuzzi-juniper-sku16