Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp561637lqp; Wed, 22 May 2024 12:19:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3Q/5rsHcBStsRxbzu/F565/BtdPllY8V+afRRBKOf1YtS6sgzGzURuFqPyJNohRuTQcL7UIhzgeDr4tcgTFjP9N/JvJd6/kq5TO8ZeQ== X-Google-Smtp-Source: AGHT+IGn5oOBnV3W1sezPXo49P3uldaRbc2RJ/hhWhA8WSIuwY0kh5CFCJ38av0AHHNMCY7ZYaqv X-Received: by 2002:a05:6122:1808:b0:4d4:2931:7d4d with SMTP id 71dfb90a1353d-4e2184ed0fbmr3064344e0c.5.1716405576063; Wed, 22 May 2024 12:19:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716405576; cv=pass; d=google.com; s=arc-20160816; b=BRdqwyLmjZMlVqEFVfgXrK0aoIdUC/P2lVS0Q8jjnaEw4fU0HSRjrv/JSzgzKxWMwo E4zKKTVAJawRHe48G4dM88ehV/LV/rtgVlbyLAWBZTXwO/yb51YdFbPydnDqqTLh4cU5 vVrJGlx69YK7PskfwySFoHxuTmcj9GI5OD1PYzv8wXOJptjY7o9hWMHDOXpLb087JaXe tJbTiaCp/lY2QfgIfUwgxgQO3wlhnaZd7uI8adA4NNOXKtn6tbkmiANVLfnrWwVTsTue cCGU1VnXTwnsrOX5bUVPq8+uCcEc5AcjbJnWDuqeahCeEDYECjtwAWyCwlBaDcnhKF4E zENw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uXeOEG0yiuRHQC9qRnLB1Dd86wBti/kGFiklcaUQ1ho=; fh=+cXZ2h2G/wq2awnhayg0/0qL9kqXGbSeQX6x8fkyL5w=; b=XdpEt8IxD62PXEeRUtSnRBDyttLwMDvDPMbOELuw9JNtxwY0kEHeT7gK18byAH6FS/ Kk+hie3UCQgt0hcSEJWV6V5rjaGxu1IKv8MrMxKHVdE62OF6GlXbkFt7seEDemT6R21L 59hyDwJ/fZ7H24b7gNbLO9GgSY1kqIfy5G/RQRw1WWdUcuLZaLHxN1j31J9ATCVI/Z4l bjm6ORRbgKzQFOpKD1cdJFaLZT+VsHjwPli34Y9k7ZWoARTjWEbGf7zEtnVMnH9BVQC0 RFYKiUb1h0k8x5TQlGXEVinBA1ZqkmVuPSlzVcINZABdIC0fglsuaVVQyrjPz1F7ceUQ eJIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LpghCUQi; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-crypto+bounces-4335-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4335-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ab8676d114si17853046d6.168.2024.05.22.12.19.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 12:19:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4335-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LpghCUQi; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-crypto+bounces-4335-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4335-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BFDED1C21432 for ; Wed, 22 May 2024 19:19:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40CAC1422B7; Wed, 22 May 2024 19:19:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="LpghCUQi" X-Original-To: linux-crypto@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70CB5171C4; Wed, 22 May 2024 19:19:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716405571; cv=none; b=ohCdgJbB61oY4yD1nt0qaZNkd+N7y8UhreOV8zHIGNv3Fvh62P4EXCrPzDIXmhMcmk1eJUE7tcJc5zsmN30Yrgw6qfCrsnqcWRVa2+2kJZi2fs78A/z1OSKn/tVrCPRjtBxY/q4q2H6AnmTlPsicYBwWgofjEAEquskU+KX1SQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716405571; c=relaxed/simple; bh=C/0YgDW6k1jbB1xPrqr/wbppkLsmgkhghaziCcwvZtw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MNTMalnHEbr/S8/wTKmvCx2YQzTJ/dcWJI26jOdVuGARLMaj0VTDlDou2RkpkdrPKNs4PytvozMmGLHBwB5P0ugtZLoMslkmx8+sZ082DMAUKpaHCZAd+9criRGhOnX9gJxWecbve8UoYjLHws7HD0MSw246eip2aYT99CuHoRU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=LpghCUQi; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1716405566; bh=C/0YgDW6k1jbB1xPrqr/wbppkLsmgkhghaziCcwvZtw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LpghCUQih/AE8vF9yODVNkOTn18v3eTqDAygyIa3UpmbrCByg2+5dd1GjebRLeFpg /fYdmaSMULdpQjnOs3f6sE9dwDqFyDfqglIMR5ehaWz93o8qVh7AmOe+Qgc3MsODfU bQSEffrPS+qtZrhvthikjbNJZpCMpL3h+0vZCSYt7auJdnO1CInvL2yJb88rUYWmmW F502mJIsNERn5O4pvwEBPs2IBho8MB7y4os5vnf0NkVJQZfpwrpIzPiYJR6Dfm4oZn +cveVIiVPDBrb54e9DqfsG0LTVPUUfCVX7Y+IVIM6kn/tMCfZ4id0/UDZh573sSYSj PpKYOSxZ0fsIQ== Received: from notapiano (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id DAB9D378217B; Wed, 22 May 2024 19:19:23 +0000 (UTC) Date: Wed, 22 May 2024 15:19:21 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Herbert Xu Cc: Eric Biggers , Jarkko Sakkinen , James Bottomley , Ard Biesheuvel , Linux Crypto Mailing List , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, regressions@lists.linux.dev, kernel@collabora.com, Linus Torvalds , Tejun Heo , Linux Kernel Mailing List , Kees Cook Subject: Re: [v3 PATCH] hwrng: core - Remove add_early_randomness Message-ID: <3a6fe46c-f4cc-47a3-8ef3-ac07bde14ca1@notapiano> References: <66ec985f3ee229135bf748f1b0874d5367a74d7f.camel@HansenPartnership.com> <20240518043115.GA53815@sol.localdomain> <00bcfa65-384d-46ae-ab8b-30f12487928b@notapiano> <07512097-8198-4a84-b166-ef9809c2913b@notapiano> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 > > 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 > Reported-by: Eric Biggers > 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 This patch also fixes the warning. Tested-by: N?colas F. R. A. Prado Thanks, N?colas