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 9A72CC433EF for ; Thu, 23 Jun 2022 16:55:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232358AbiFWQzM (ORCPT ); Thu, 23 Jun 2022 12:55:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233118AbiFWQuN (ORCPT ); Thu, 23 Jun 2022 12:50:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE4284EA18; Thu, 23 Jun 2022 09:48:17 -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 ams.source.kernel.org (Postfix) with ESMTPS id DA3BAB8248E; Thu, 23 Jun 2022 16:48:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E747C3411B; Thu, 23 Jun 2022 16:48:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656002894; bh=gJIh6DziEVd+6iAQZZ06VpGFjivFBs5JM1Ure0kb+uc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pK7KKahxEXtfdoZxfUfbZ200oCBz7Qsi2X7lE+OKxgiU3LWDcBQP6qHoNczQl68ey HVz4ezqEGPv5aMZE5EfzUST5OVMaUOwTUYvXQgL5HPeulN5eth/b75bMgZntzDgSwU GEiB/GcaYHPCEv8etqR8RcsCpD56vrE6ivhHgzrQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Lutomirski , Theodore Tso , "Jason A. Donenfeld" Subject: [PATCH 4.9 061/264] random: remove kernel.random.read_wakeup_threshold Date: Thu, 23 Jun 2022 18:40:54 +0200 Message-Id: <20220623164345.799251671@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 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Andy Lutomirski commit c95ea0c69ffda19381c116db2be23c7e654dac98 upstream. It has no effect any more, so remove it. We can revert this if there is some user code that expects to be able to set this sysctl. Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/a74ed2cf0b5a5451428a246a9239f5bc4e29358f.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o Signed-off-by: Jason A. Donenfeld Signed-off-by: Greg Kroah-Hartman --- drivers/char/random.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -371,12 +371,6 @@ #define ENTROPY_BITS(r) ((r)->entropy_count >> ENTROPY_SHIFT) /* - * The minimum number of bits of entropy before we wake up a read on - * /dev/random. Should be enough to do a significant reseed. - */ -static int random_read_wakeup_bits = 64; - -/* * If the entropy count falls under this number of bits, then we * should wake up processes which are selecting or polling on write * access to /dev/random. @@ -2061,8 +2055,7 @@ SYSCALL_DEFINE3(getrandom, char __user * #include -static int min_read_thresh = 8, min_write_thresh; -static int max_read_thresh = OUTPUT_POOL_WORDS * 32; +static int min_write_thresh; static int max_write_thresh = INPUT_POOL_WORDS * 32; static int random_min_urandom_seed = 60; static char sysctl_bootid[16]; @@ -2138,15 +2131,6 @@ struct ctl_table random_table[] = { .data = &input_pool.entropy_count, }, { - .procname = "read_wakeup_threshold", - .data = &random_read_wakeup_bits, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &min_read_thresh, - .extra2 = &max_read_thresh, - }, - { .procname = "write_wakeup_threshold", .data = &random_write_wakeup_bits, .maxlen = sizeof(int),