From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF7A1C433F5 for ; Mon, 28 Feb 2022 13:38:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236588AbiB1Nio (ORCPT ); Mon, 28 Feb 2022 08:38:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236465AbiB1Nii (ORCPT ); Mon, 28 Feb 2022 08:38:38 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1428319299 for ; Mon, 28 Feb 2022 05:38:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A105E61351 for ; Mon, 28 Feb 2022 13:37:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8A929C340EE; Mon, 28 Feb 2022 13:37:58 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="JLNDk3Ns" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1646055476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=yBAjIGtXGXzFKmXRbYM99qGpu6w6a37/fyHfX7msMaY=; b=JLNDk3Ns6dtKyO0I+zDBAF6bWj9pgkSMh+BOAJVuhpTEQWWHZsFyGmnXh9B1U7NFbclf9L hYc5QhRBpc8f6bL8F2Mq5g2cW3p8yhdRX7Zgn2SI4aYyuoP/+IJasHuNe3VGkzzZTbsihd s0yrUuXzC0ZdUh3mE5uceY9eQnY8z20= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id f7aa725e (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 28 Feb 2022 13:37:56 +0000 (UTC) From: "Jason A. Donenfeld" To: linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" , Dominik Brodowski , Theodore Ts'o Subject: [PATCH 1/2] random: give sysctl_random_min_urandom_seed a more sensible value Date: Mon, 28 Feb 2022 14:37:42 +0100 Message-Id: <20220228133743.2243-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This isn't used by anything or anywhere, but we can't delete it due to compatibility. So at least give it the correct value of what it's supposed to be instead of a garbage one. Cc: Dominik Brodowski Cc: Theodore Ts'o Signed-off-by: Jason A. Donenfeld --- drivers/char/random.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 8171c3bbf460..116ebf50d791 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1619,7 +1619,7 @@ const struct file_operations urandom_fops = { * to avoid breaking old userspaces, but writing to it does not * change any behavior of the RNG. * - * - urandom_min_reseed_secs - fixed to the meaningless value "60". + * - urandom_min_reseed_secs - fixed to the value CRNG_RESEED_INTERVAL. * It is writable to avoid breaking old userspaces, but writing * to it does not change any behavior of the RNG. * @@ -1629,7 +1629,7 @@ const struct file_operations urandom_fops = { #include -static int sysctl_random_min_urandom_seed = 60; +static int sysctl_random_min_urandom_seed = CRNG_RESEED_INTERVAL / HZ; static int sysctl_random_write_wakeup_bits = POOL_MIN_BITS; static int sysctl_poolsize = POOL_BITS; static u8 sysctl_bootid[UUID_SIZE]; -- 2.35.1