mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [GIT PULL] random number generator fixes for 5.18-rc3
Date: Sat, 16 Apr 2022 15:13:18 +0200	[thread overview]
Message-ID: <20220416131318.80278-1-Jason@zx2c4.com> (raw)

Hi Linus,

Please pull the following three fixes to the RNG for 5.18-rc3:

- Per your suggestion, random reads now won't fail if there's a page fault
  after some non-zero amount of data has been read, which makes the behavior
  consistent with all other reads in the kernel.

- Rather than an inconsistent mix of random_get_entropy() returning an
  unsigned long or a cycles_t, now it just returns an unsigned long.

- A memcpy() was replaced with an memmove(), because the addresses are
  sometimes overlapping. In practice the destination is always before the
  source, so not really an issue, but better to be correct than not.

Thanks,
Jason

The following changes since commit a19944809fe9942e6a96292490717904d0690c21:

  Merge tag 'hardening-v5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux (2022-04-12 14:29:40 -1000)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git tags/random-5.18-rc3-for-linus

for you to fetch changes up to 35a33ff3807d3adb9daaf937f5bca002ffa9f84e:

  random: use memmove instead of memcpy for remaining 32 bytes (2022-04-16 12:53:31 +0200)

----------------------------------------------------------------
Random number generator fixes for Linux 5.18-rc3.
----------------------------------------------------------------

Jason A. Donenfeld (3):
      random: allow partial reads if later user copies fail
      random: make random_get_entropy() return an unsigned long
      random: use memmove instead of memcpy for remaining 32 bytes

 drivers/char/random.c | 44 ++++++++++++++++++++------------------------
 include/linux/timex.h |  2 +-
 2 files changed, 21 insertions(+), 25 deletions(-)

             reply	other threads:[~2022-04-16 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-16 13:13 Jason A. Donenfeld [this message]
2022-04-17  0:12 ` pr-tracker-bot

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=20220416131318.80278-1-Jason@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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

all inboxes | Powered by JetHome®