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 B853E224AE6; Tue, 29 Apr 2025 17:23:54 +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=1745947434; cv=none; b=kZiDRf6b+MUCyBW7W/7t2WqmRhBrG53NdVSPYfsmlO6jiXuz69BwwEduJtkgZnrYxGRWhI4VxpMn8v2lAyneFduiY/l7HUZoAYbE//gWhIlvfqSK7W4HbR+1aGULtgd8my1Q7EK6oWDpl2PufU5e+K8MSTYHalIIwHNJLrMOspE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745947434; c=relaxed/simple; bh=c88LhpkoO+isYNQLyd3LYeCGsyfmA0JBd/2WhWuAssM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JCtwTSBikhvf0QmmvN4rBNnLYHBn4oTPMK3Dv+72s53R028UF6VxfKP/q56QAFsnltL97+ZeWIIsS7GLRroXB9I3bKvfXdGDKrr67fV+nOO1t9M2Yo9FyVBbH/zWlbleUxWnHzHBBgkmSfMKi4cczgULylDUuxFYUZ0phQN96oU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nH802MBk; 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="nH802MBk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 284D4C4CEE3; Tue, 29 Apr 2025 17:23:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1745947434; bh=c88LhpkoO+isYNQLyd3LYeCGsyfmA0JBd/2WhWuAssM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nH802MBkkE2LdviGOpjGXlcuubTKRqHDTwcIFKs9C/69z9sk5Ng0a80A+ECXb+odQ J//Bc26o4ms4HcfFVsPTnopZGYBeEgC5/Oqvm+y24mhx6peDL7g+Kz9qhv1We52/Oo d2YX0DHDYD+SCySxt2g6Au+Yn9RMCEZmQTeUKqXc= 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 5.10 279/286] crypto: atmel-sha204a - Set hwrng quality to lowest possible Date: Tue, 29 Apr 2025 18:43:03 +0200 Message-ID: <20250429161119.388392962@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250429161107.848008295@linuxfoundation.org> References: <20250429161107.848008295@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.10-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)