All of lore.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, Theodore Ts'o <tytso@mit.edu>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Jann Horn <jannh@google.com>
Subject: Re: [PATCH v3] random: make more consistent use of integer types
Date: Mon, 21 Feb 2022 11:15:15 -0800	[thread overview]
Message-ID: <YhPkw4xhJKSuAZHU@sol.localdomain> (raw)
In-Reply-To: <20220221150523.2282542-1-Jason@zx2c4.com>

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@mit.edu>
> Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
> Reviewed-by: Jann Horn <jannh@google.com>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.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@google.com>

- Eric

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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 13:52 [PATCH] random: make more consistent use of integer types Jason A. Donenfeld
2022-02-09 18:05 ` [PATCH v2] " Jason A. Donenfeld
2022-02-09 18:56   ` Dominik Brodowski
2022-02-21  3:53   ` Eric Biggers
2022-02-21 15:04     ` Jason A. Donenfeld
2022-02-21 15:05       ` [PATCH v3] " Jason A. Donenfeld
2022-02-21 19:15         ` Eric Biggers [this message]

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=YhPkw4xhJKSuAZHU@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=jannh@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.