Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6131646iog; Thu, 23 Jun 2022 12:01:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t3NyQlmK/lbhBaH2C/uE1Q3T/HoktgDn+vocdbHafID+hXcdJBlnEcAyXex2bk9pT8r6Ym X-Received: by 2002:a62:6dc2:0:b0:525:43c8:79f7 with SMTP id i185-20020a626dc2000000b0052543c879f7mr10777929pfc.49.1656010897134; Thu, 23 Jun 2022 12:01:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656010897; cv=none; d=google.com; s=arc-20160816; b=zlOFvpL+HRHviwY27x4X+ylfT0OUyNcJht9OnB5NYe2a6Y/SdfRkREB4wA2P6m+4jZ cq6LZEbBuU0xnnrewOLCGCTXhsmu/qm4WzBxKomMzHpyWsEk4tx30tki96SgLw9Ft63s sXYp7zca46ZlHucYJcltVGbO83E2mBUtHn1RSNUFxe34coNPf2ubkHHFd/DLMAlMjlN1 0gCKVEGFhiWPiD73cKeuyDgteEZiJzNYeCGxb2LtT+pIbI1YambDdtvXnlRAsWPZ8DTc v3vybvSSIU6R8UtS38QZKl3V6SSmDBmas8rTdcOp4ao9luVudXfaibG+mFcUYxUxeFK7 54Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gKO2HsYGZ4SKAJLmpJzEMp3DMcVhm9OlMYNWZnoE5kU=; b=x37REFS94UslwE74LAhuM4T42r6LJ/nyi7A0idwrOQHiSfjU0A6KB17eOC1rNHD/tp e35n4D/SQrXpxUZ0os7j72MlXNZ57GLlx9ktmyIFqbaDEecI3MrmLKlneFEuuO5vdYtQ fpNTO3iuAzNo/LnglNpZa3+ofpyf4l9O8uROVCkF8/YM6eQ0WrbRzG/R5bteX2h/IU4R KwMeiUvXWMB8P9pOp913n5OfKfJJv5XYF3ZpjDbVH3c54DqAJ8AoGYBqs7y23lffu2AI MRkyJhqEV9UN6Mc980y4SS6c20Dh3pEvuqydpkpYOSxYffvOMFVGwVMJhDBS6+bBXrK6 LLsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zN4BSDpo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j64-20020a638043000000b0040c9f150eacsi15953793pgd.568.2022.06.23.12.01.25; Thu, 23 Jun 2022 12:01:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zN4BSDpo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233153AbiFWRC0 (ORCPT + 99 others); Thu, 23 Jun 2022 13:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233245AbiFWQ5k (ORCPT ); Thu, 23 Jun 2022 12:57:40 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD5C94D631; Thu, 23 Jun 2022 09:53:26 -0700 (PDT) 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 sin.source.kernel.org (Postfix) with ESMTPS id 9FD80CE25CA; Thu, 23 Jun 2022 16:53:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D544C3411B; Thu, 23 Jun 2022 16:53:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656003193; bh=+XdeAMZGulDlklmAx2AM9VR97QYmurT/FuKkS1NDyBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zN4BSDpotblv3L1LQ76oSk4wwTMY8Kls7Rxs9Me+/eX07A8lotLLvUYyJ/faFPeXf knJnRhVpG5zCJ6EqEiut5Sh2n0z+WizRXglMBczM7T7owTRfUbGOOloGVGLkgXPqJS 4U9Ut86R9XUGaKpp1Lz9VF1en3AguKshZl7k3xo4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Theodore Tso , Dominik Brodowski , "Jason A. Donenfeld" Subject: [PATCH 4.9 159/264] random: give sysctl_random_min_urandom_seed a more sensible value Date: Thu, 23 Jun 2022 18:42:32 +0200 Message-Id: <20220623164348.561292388@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164344.053938039@linuxfoundation.org> References: <20220623164344.053938039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Jason A. Donenfeld" commit d0efdf35a6a71d307a250199af6fce122a7c7e11 upstream. 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: Theodore Ts'o Reviewed-by: Dominik Brodowski Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- drivers/char/random.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1613,7 +1613,7 @@ const struct file_operations urandom_fop * 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. * @@ -1623,7 +1623,7 @@ const struct file_operations urandom_fop #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];