[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3a6fe46c-f4cc-47a3-8ef3-ac07bde14ca1@notapiano>
Date: Wed, 22 May 2024 15:19:21 -0400
From: Nícolas F. R. A. Prado <nfraprado@...labora.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Eric Biggers <ebiggers@...nel.org>, Jarkko Sakkinen <jarkko@...nel.org>,
James Bottomley <James.Bottomley@...senpartnership.com>,
Ard Biesheuvel <ardb@...nel.org>,
Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
linux-integrity@...r.kernel.org, keyrings@...r.kernel.org,
regressions@...ts.linux.dev, kernel@...labora.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Tejun Heo <tj@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Kees Cook <keescook@...omium.org>
Subject: Re: [v3 PATCH] hwrng: core - Remove add_early_randomness
On Wed, May 22, 2024 at 01:37:54PM +0800, Herbert Xu wrote:
> On Tue, May 21, 2024 at 03:37:16PM -0400, Nícolas F. R. A. Prado wrote:
> >
> > FWIW this patch fixes the warning. So feel free to add
> >
> > Tested-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
>
> Could you please test this patch instead?
>
> ---8<---
> A potential deadlock was reported with the config file at
>
> https://web.archive.org/web/20240522052129/https://0x0.st/XPN_.txt
>
> In this particular configuration, the deadlock doesn't exist because
> the warning triggered at a point before modules were even available.
> However, the deadlock can be real because any module loaded would
> invoke async_synchronize_full.
>
> The issue is spurious for software crypto algorithms which aren't
> themselves involved in async probing. However, it would be hard to
> avoid for a PCI crypto driver using async probing.
>
> In this particular call trace, the problem is easily avoided because
> the only reason the module is being requested during probing is the
> add_early_randomness call in the hwrng core. This feature is
> vestigial since there is now a kernel thread dedicated to doing
> exactly this.
>
> So remove add_early_randomness as it is no longer needed.
>
> Reported-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
> Reported-by: Eric Biggers <ebiggers@...nel.org>
> Fixes: 1b6d7f9eb150 ("tpm: add session encryption protection to tpm2_get_random()")
> Link: https://lore.kernel.org/r/119dc5ed-f159-41be-9dda-1a056f29888d@notapiano/
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
This patch also fixes the warning.
Tested-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
Thanks,
Nícolas
Powered by blists - more mailing lists