[GIT PULL] /dev/random updates for 4.13

From: Theodore Ts'o
Date: Sat Jul 15 2017 - 14:38:31 EST


The following changes since commit b169c13de473a85b3c859bb36216a4cb5f00a54a:

random: invalidate batched entropy after crng init (2017-06-07 19:45:37 -0400)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random.git tags/random_for_linus

for you to fetch changes up to 72e5c740f6335e27253b8ff64d23d00337091535:

random: reorder READ_ONCE() in get_random_uXX (2017-07-15 12:33:22 -0400)

n.b. There is a trivial merge conflict with include/linux/random.h
where branches added lines at the same insertion point.

----------------------------------------------------------------
Add wait_for_random_bytes() and get_random_*_wait() functions so that
callers can more safely get random bytes if they can block until the
CRNG is initialized.

Also print a warning if get_random_*() is called before the CRNG is
initialized. By default, only one single-line warning will be printed
per boot. If CONFIG_WARN_ALL_UNSEEDED_RANDOM is defined, then a
warning will be printed for each function which tries to get random
bytes before the CRNG is initialized. This can get spammy for certain
architecture types, so it is not enabled by default.

----------------------------------------------------------------
Jason A. Donenfeld (10):
random: silence compiler warnings and fix race
random: add wait_for_random_bytes() API
random: add get_random_{bytes,u32,u64,int,long,once}_wait family
cifs: use get_random_u32 for 32-bit lock random
iscsi: ensure RNG is seeded before use
ceph: ensure RNG is seeded before using
rhashtable: use get_random_u32 for hash_rnd
net/neighbor: use get_random_u32 for 32-bit hash random
net/route: use get_random_int for random counter
random: warn when kernel uses unseeded randomness

Sebastian Andrzej Siewior (1):
random: reorder READ_ONCE() in get_random_uXX

Theodore Ts'o (1):
random: suppress spammy warnings about unseeded randomness

drivers/char/random.c | 104 ++++++++++++++++++++++++++++++++++-----------
drivers/target/iscsi/iscsi_target_auth.c | 14 ++++--
drivers/target/iscsi/iscsi_target_login.c | 22 ++++++----
fs/cifs/cifsfs.c | 2 +-
include/linux/net.h | 2 +
include/linux/once.h | 2 +
include/linux/random.h | 26 ++++++++++++
lib/Kconfig.debug | 28 ++++++++++++
lib/rhashtable.c | 2 +-
net/ceph/ceph_common.c | 6 ++-
net/core/neighbour.c | 3 +-
net/ipv4/route.c | 3 +-
12 files changed, 172 insertions(+), 42 deletions(-)