Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 27 Jul 2016 22:11:55 +0000 (15:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 27 Jul 2016 22:11:55 +0000 (15:11 -0700)
Pull random driver updates from Ted Ts'o:
 "A number of improvements for the /dev/random driver; the most
  important is the use of a ChaCha20-based CRNG for /dev/urandom, which
  is faster, more efficient, and easier to make scalable for
  silly/abusive userspace programs that want to read from /dev/urandom
  in a tight loop on NUMA systems.

  This set of patches also improves entropy gathering on VM's running on
  Microsoft Azure, and will take advantage of a hw random number
  generator (if present) to initialize the /dev/urandom pool"

(It turns out that the random tree hadn't been in linux-next this time
around, because it had been dropped earlier as being too quiet.  Oh
well).

* tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
  random: strengthen input validation for RNDADDTOENTCNT
  random: add backtracking protection to the CRNG
  random: make /dev/urandom scalable for silly userspace programs
  random: replace non-blocking pool with a Chacha20-based CRNG
  random: properly align get_random_int_hash
  random: add interrupt callback to VMBus IRQ handler
  random: print a warning for the first ten uninitialized random users
  random: initialize the non-blocking pool via add_hwgenerator_randomness()

1  2 
lib/Makefile

diff --combined lib/Makefile
@@@ -15,11 -15,14 +15,11 @@@ KCOV_INSTRUMENT_rbtree.o := 
  KCOV_INSTRUMENT_list_debug.o := n
  KCOV_INSTRUMENT_debugobjects.o := n
  KCOV_INSTRUMENT_dynamic_debug.o := n
 -# Kernel does not boot if we instrument this file as it uses custom calling
 -# convention (see CONFIG_ARCH_HWEIGHT_CFLAGS).
 -KCOV_INSTRUMENT_hweight.o := n
  
  lib-y := ctype.o string.o vsprintf.o cmdline.o \
         rbtree.o radix-tree.o dump_stack.o timerqueue.o\
         idr.o int_sqrt.o extable.o \
-        sha1.o md5.o irq_regs.o argv_split.o \
+        sha1.o chacha20.o md5.o irq_regs.o argv_split.o \
         flex_proportions.o ratelimit.o show_mem.o \
         is_single_threaded.o plist.o decompress.o kobject_uevent.o \
         earlycpio.o seq_buf.o nmi_backtrace.o nodemask.o
@@@ -55,7 -58,6 +55,7 @@@ obj-$(CONFIG_TEST_STATIC_KEYS) += test_
  obj-$(CONFIG_TEST_STATIC_KEYS) += test_static_key_base.o
  obj-$(CONFIG_TEST_PRINTF) += test_printf.o
  obj-$(CONFIG_TEST_BITMAP) += test_bitmap.o
 +obj-$(CONFIG_TEST_UUID) += test_uuid.o
  
  ifeq ($(CONFIG_DEBUG_KOBJECT),y)
  CFLAGS_kobject.o += -DDEBUG
@@@ -71,6 -73,8 +71,6 @@@ obj-$(CONFIG_HAS_IOMEM) += iomap_copy.
  obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
  obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
  
 -GCOV_PROFILE_hweight.o := n
 -CFLAGS_hweight.o = $(subst $(quote),,$(CONFIG_ARCH_HWEIGHT_CFLAGS))
  obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
  
  obj-$(CONFIG_BTREE) += btree.o