lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YhMhbKdIH2wwEDxc@sol.localdomain>
Date:   Sun, 20 Feb 2022 21:21:48 -0800
From:   Eric Biggers <ebiggers@...nel.org>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-kernel@...r.kernel.org, linux@...inikbrodowski.net,
        Theodore Ts'o <tytso@....edu>
Subject: Re: [PATCH v2 09/10] random: group sysctl functions

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@....edu>
> Cc: Dominik Brodowski <linux@...inikbrodowski.net>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ