Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3481526pxb; Sun, 20 Feb 2022 21:48:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1lgLTxbVyDLcoZW5yjg0dF72grysiA0IEnM6Ch+RnhEsORIodqh9VYqKJOeDDUE2Kvwdd X-Received: by 2002:a05:6402:90b:b0:412:e7f8:6de6 with SMTP id g11-20020a056402090b00b00412e7f86de6mr8178790edz.182.1645422502305; Sun, 20 Feb 2022 21:48:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645422502; cv=none; d=google.com; s=arc-20160816; b=CI1UvMSlR+hXQ50u0wIsChVcsUYSlZtzl0kty6kaVxmkJRbPL2ZUYXmeBdL2nNLLy1 answo909MW8U8uhsObkHBpwCelGDR+Mmz7IDgSXdGx+IvwBavBcq/fCToKRQ+p0IU/K8 t9QL94RMuUQfqd8WyphUi7sExp6rZQwHnV52o6iHGv/ZO6zmnov/WDIeAwLhaMlvLxRs lqxsBCKWWlVplJ8DiIaFWiB1+RSFkkood2F4pBYpACVBfrlnCnLKKDz4b1dM6oS6KoRc 1kueswC2U1A/FYHeNlhojIgsCpsngh+um8wRDu9t0fWPccsoIh0FSRKsXRydcQ8OnXFQ Ky0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZoAcGUVENEk/0kk91FEt7ugPXT4/XCtZpBKp2ozAt6Y=; b=YK2UBRlcsq5DkoyPQ1UOMtNtRXdXWOudq61O9OZOtvKj3ovG5Jo+FdMAOqO4iFzqoL mk3I2m901Hp1hM3WsJIQ+pIOYPXKVYkq0/eaxOMamqobM4lb4FklxZvVL4SS1Su9B36p BFI5EkVtTVvNtKnBd8+Ydh+/jFv+tKMw4qxWFIWvT8xFC4V3XyS1fYvgUTrggkXqUFHN I5CtIQpKq3P9We16Ej+qGGAqXfp7DzTv9hfCdMLDGQCZHzTNq8W1NEezAtiSpPJMuKHT jN9noJZ5u5ILqVd+8clCi+qboCpJiz7tW3s+fspHllf0sDq4BQ2rJG0wJ+Xg7kwm3XC9 19fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iJWZqcwn; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id vj13si7345637ejb.126.2022.02.20.21.48.00; Sun, 20 Feb 2022 21:48:22 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=iJWZqcwn; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344307AbiBUFWP (ORCPT + 99 others); Mon, 21 Feb 2022 00:22:15 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243409AbiBUFWO (ORCPT ); Mon, 21 Feb 2022 00:22:14 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E0EFE29 for ; Sun, 20 Feb 2022 21:21:51 -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 10AEC611D0 for ; Mon, 21 Feb 2022 05:21:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54D43C340E9; Mon, 21 Feb 2022 05:21:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645420910; bh=tKN5lVyIdydcnMmzW64HD2z0D7NvvLEpCWMv4HHhS28=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iJWZqcwnKTigFSQ0X3zkh+yU4KUaaNYY6gvjHaoX1gSSBIaIg/ImpEndvQ0sPuQCR SCFcfXQSWZWctVg4925sAhZMotxz9dHJMwQEADk7ybd5KXI/0hoI7DGqFKKC6P4Gi1 BEKHnD7Hz0C80E0cHLkJtZJCL6V8IqSG+ruyu8lzkJKMhV8blIZjiJU6RClSo7M3dF KYe3QpJFOpTyTVUyjkslYpQBOPPN/WyxaVWWeAvkOhHoH6dTRHlFAA0x5xXhxWpM61 suDQDipcc574Tx7uuWTq6Y+h3MfsSSzaeGsHIWj9y8JJb9SNlLzx/ZMxMVxBNLhcL1 Pn5GatbQFdnew== Date: Sun, 20 Feb 2022 21:21:48 -0800 From: Eric Biggers To: "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org, linux@dominikbrodowski.net, Theodore Ts'o Subject: Re: [PATCH v2 09/10] random: group sysctl functions Message-ID: References: <20220212122318.623435-1-Jason@zx2c4.com> <20220212122318.623435-10-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220212122318.623435-10-Jason@zx2c4.com> X-Spam-Status: No, score=-7.1 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 On Sat, Feb 12, 2022 at 01:23:17PM +0100, Jason A. Donenfeld wrote: > This pulls all of the sysctl-focused functions into the sixth labeled > section. > > No functional changes. > > Cc: Theodore Ts'o > Cc: Dominik Brodowski > Signed-off-by: Jason A. Donenfeld > --- > drivers/char/random.c | 37 +++++++++++++++++++++++++++++++------ > 1 file changed, 31 insertions(+), 6 deletions(-) > > diff --git a/drivers/char/random.c b/drivers/char/random.c > index b2af2dc96d20..a32176a46691 100644 > --- a/drivers/char/random.c > +++ b/drivers/char/random.c > @@ -1678,9 +1678,34 @@ const struct file_operations urandom_fops = { > .llseek = noop_llseek, > }; > > + > /******************************************************************** > * > - * Sysctl interface > + * Sysctl interface. > + * > + * These are partly unused legacy knobs with dummy values to not break > + * userspace and partly still useful things. They are usually accessible > + * in /proc/sys/kernel/random/ and are as follows: > + * > + * - boot_id - a UUID representing the current boot. > + * > + * - uuid - a random UUID, different each time the file is read. > + * > + * - poolsize - the number of bits of entropy that the input pool can > + * hold, tied to the POOL_BITS constant. > + * > + * - entropy_avail - the number of bits of entropy currently in the > + * input pool. Always <= poolsize. > + * > + * - write_wakeup_threshold - the amount of entropy in the input pool > + * below which write polls to /dev/random will unblock, requesting > + * more entropy, tied to the POOL_MIN_BITS constant. It is writable > + * 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". > + * It is writable to avoid breaking old userspaces, but writing > + * to it does not change any behavior of the RNG. > * This is a nice explanation, but shouldn't Documentation/admin-guide/sysctl/kernel.rst be updated instead, and this comment point to there? > device_initcall(random_sysctls_init); > -#endif /* CONFIG_SYSCTL */ > +#endif Nit: I'd prefer leaving the comment for the #endif. - Eric