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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 21 Feb 2022 11:15:15 -0800
From:   Eric Biggers <ebiggers@...nel.org>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-kernel@...r.kernel.org, Theodore Ts'o <tytso@....edu>,
        Dominik Brodowski <linux@...inikbrodowski.net>,
        Jann Horn <jannh@...gle.com>
Subject: Re: [PATCH v3] random: make more consistent use of integer types

On Mon, Feb 21, 2022 at 04:05:23PM +0100, Jason A. Donenfeld wrote:
> We've been using a flurry of int, unsigned int, size_t, and ssize_t.
> Let's unify all of this into size_t where it makes sense, as it does in
> most places, and leave ssize_t for return values with possible errors.
> 
> In addition, keeping with the convention of other functions in this
> file, functions that are dealing with raw bytes now take void *
> consistently instead of a mix of that and u8 *, because much of the time
> we're actually passing some other structure that is then interpreted as
> bytes by the function.
> 
> We also take the opportunity to fix the outdated and incorrect comment
> in get_random_bytes_arch().
> 
> Cc: Theodore Ts'o <tytso@....edu>
> Reviewed-by: Dominik Brodowski <linux@...inikbrodowski.net>
> Reviewed-by: Jann Horn <jannh@...gle.com>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> ---
> v3 changes a u8* into a const u8* and makes the rand_initialize loop
> count up from 0, per Eric's request.
> 
>  drivers/char/random.c         | 123 +++++++++++++++-------------------
>  include/linux/hw_random.h     |   2 +-
>  include/linux/random.h        |  10 +--
>  include/trace/events/random.h |  79 +++++++++++-----------
>  4 files changed, 99 insertions(+), 115 deletions(-)

Reviewed-by: Eric Biggers <ebiggers@...gle.com>

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ