From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 0617F1A5BBB; Tue, 29 Apr 2025 18:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745950096; cv=none; b=d/0iW8qT+2aBzjwfA4pFOCZshvTvE4D01d2soThIOdRG1DKRnH13U3nB/T7yzZzA5dOi9dXSiE13omj9bW0rrhgkIgtbZxkjdtaiv2yi7b2DnVa5ifRxcOweFgR2AhOu4z2DieGHSs40Loo+R5nEtNlPfNxaBS+C1eRzFrz/xdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745950096; c=relaxed/simple; bh=lo8rY3tWJuR6mLXExhKkSzpZW3NHp2hySa45m6pWgZk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=u+WrUwToBOqc0bMfOifdXzZQ73ZpZR/UAkhmm+q06+Z6vQ4aSlc4jHHhvwiQdpBUVCfE2Cyn7UT9dXTSR1KEoW0clHbHysrCcWUEJ7uBVY6GqM55flwdR0bq3i7LAtsdkhnNpUhNASaTzOZrUm11HNrbWtMIlHAzvoJJxXDHu88= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kh/PBH8X; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="kh/PBH8X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FFC0C4CEE3; Tue, 29 Apr 2025 18:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745950095; bh=lo8rY3tWJuR6mLXExhKkSzpZW3NHp2hySa45m6pWgZk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kh/PBH8XTi9oJ5ubpaVSXhHt/+VmXjjMu7pFM96Ji79dCeVUwlr/CGk39jtbaHyK4 nvW2Zn2IagbsEIbbsuexLMkMoi0goBh2llbR4quHuPwVYRljdkhx35s9W2SBL/1i8x Ir80Sz8w4HYHyQqfYgWkKkT8jPGmoBpwtzscWav8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Marek=20Beh=C3=BAn?= , Ard Biesheuvel , Linus Walleij , Herbert Xu Subject: [PATCH 6.1 153/167] crypto: atmel-sha204a - Set hwrng quality to lowest possible Date: Tue, 29 Apr 2025 18:44:21 +0200 Message-ID: <20250429161057.911974303@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161051.743239894@linuxfoundation.org> References: <20250429161051.743239894@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Marek Behún commit 8006aff15516a170640239c5a8e6696c0ba18d8e upstream. According to the review by Bill Cox [1], the Atmel SHA204A random number generator produces random numbers with very low entropy. Set the lowest possible entropy for this chip just to be safe. [1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html Fixes: da001fb651b00e1d ("crypto: atmel-i2c - add support for SHA204A random number generator") Cc: Signed-off-by: Marek Behún Acked-by: Ard Biesheuvel Reviewed-by: Linus Walleij Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman Signed-off-by: Marek Behún --- drivers/crypto/atmel-sha204a.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) --- a/drivers/crypto/atmel-sha204a.c +++ b/drivers/crypto/atmel-sha204a.c @@ -107,7 +107,12 @@ static int atmel_sha204a_probe(struct i2 i2c_priv->hwrng.name = dev_name(&client->dev); i2c_priv->hwrng.read = atmel_sha204a_rng_read; - i2c_priv->hwrng.quality = 1024; + + /* + * According to review by Bill Cox [1], this HWRNG has very low entropy. + * [1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html + */ + i2c_priv->hwrng.quality = 1; ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng); if (ret)