public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-kernel@vger.kernel.org, linux@dominikbrodowski.net,
	Theodore Ts'o <tytso@mit.edu>
Subject: Re: [PATCH v2 09/10] random: group sysctl functions
Date: Sun, 20 Feb 2022 21:21:48 -0800	[thread overview]
Message-ID: <YhMhbKdIH2wwEDxc@sol.localdomain> (raw)
In-Reply-To: <20220212122318.623435-10-Jason@zx2c4.com>

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 <tytso@mit.edu>
> Cc: Dominik Brodowski <linux@dominikbrodowski.net>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
>  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

  reply	other threads:[~2022-02-21  5:21 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12 12:23 [PATCH v2 00/10] random: re-group and re-document functions Jason A. Donenfeld
2022-02-12 12:23 ` [PATCH v2 01/10] random: introduce drain_entropy() helper to declutter crng_reseed() Jason A. Donenfeld
2022-02-21  4:34   ` Eric Biggers
2022-02-21 14:49     ` Jason A. Donenfeld
2022-02-21 14:49       ` [PATCH v3] " Jason A. Donenfeld
2022-02-21 19:19         ` Eric Biggers
2022-02-12 12:23 ` [PATCH v2 02/10] random: remove useless header comment Jason A. Donenfeld
2022-02-21  4:34   ` Eric Biggers
2022-02-12 12:23 ` [PATCH v2 03/10] random: remove whitespace and reorder includes Jason A. Donenfeld
2022-02-21  4:35   ` Eric Biggers
2022-02-12 12:23 ` [PATCH v2 04/10] random: group initialization wait functions Jason A. Donenfeld
2022-02-13  6:54   ` Dominik Brodowski
2022-02-13 13:11     ` Jason A. Donenfeld
2022-02-21  4:49   ` Eric Biggers
2022-02-21 15:10     ` Jason A. Donenfeld
2022-02-21 15:14       ` [PATCH v3] " Jason A. Donenfeld
2022-02-21 19:20         ` Eric Biggers
2022-02-12 12:23 ` [PATCH v2 05/10] random: group crng functions Jason A. Donenfeld
2022-02-13  6:54   ` Dominik Brodowski
2022-02-13 13:14     ` Jason A. Donenfeld
2022-02-21  5:00   ` Eric Biggers
2022-02-12 12:23 ` [PATCH v2 06/10] random: group entropy extraction functions Jason A. Donenfeld
2022-02-21  5:05   ` Eric Biggers
2022-02-12 12:23 ` [PATCH v2 07/10] random: group entropy collection functions Jason A. Donenfeld
2022-02-13  6:54   ` Dominik Brodowski
2022-02-13 13:16     ` Jason A. Donenfeld
2022-02-21  5:13   ` Eric Biggers
2022-02-21 15:17     ` Jason A. Donenfeld
2022-02-21 15:18       ` [PATCH v3] " Jason A. Donenfeld
2022-02-21 19:23         ` Eric Biggers
2022-02-12 12:23 ` [PATCH v2 08/10] random: group userspace read/write functions Jason A. Donenfeld
2022-02-21  5:16   ` Eric Biggers
2022-02-12 12:23 ` [PATCH v2 09/10] random: group sysctl functions Jason A. Donenfeld
2022-02-21  5:21   ` Eric Biggers [this message]
2022-02-21 15:27     ` Jason A. Donenfeld
2022-02-21 15:39       ` Jason A. Donenfeld
2022-02-12 12:23 ` [PATCH v2 10/10] random: rewrite header introductory comment Jason A. Donenfeld
2022-02-21  5:26   ` Eric Biggers
2022-02-13  6:55 ` [PATCH v2 00/10] random: re-group and re-document functions Dominik Brodowski
2022-02-13 13:07   ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YhMhbKdIH2wwEDxc@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox