linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] random: improve entropy pool initialization at boot time
@ 2013-11-03 13:33 Theodore Ts'o
  2013-11-03 13:33 ` [PATCH 1/4] random: use device attach events for entropy Theodore Ts'o
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Theodore Ts'o @ 2013-11-03 13:33 UTC (permalink / raw)
  To: linux-crypto; +Cc: linux-kernel, Theodore Ts'o

These patches improve how /dev/random initializes its entropy pool
during the kernel boot sequence.  With these changes, using an x86 test
kernel run under KVM, the urandom pool gets initialized before the init
scripts start running, and of the kernel users of get_random_bytes(), a
debugging printk found only two users of get_random_bytes() before the
nonblocking pool could be fully initialized:

rc80211_minstrel_ht_init+0x2b/0x6a called get_random_bytes with 22 bits of entropy available
neigh_hash_alloc+0x82/0x94 called get_random_bytes with 31 bits of entropy available

Both of these calls were in a subsys_initcall(); and the first one I'm
fairly certain could be replaced by the use of prandom_u32().

Note: I've cc'ed these patches to linux-crypto so hopefully more people
will review these patches.

              	       	     		    	- Ted

Theodore Ts'o (4):
  random: use device attach events for entropy
  random: make add_timer_randomness() fill the nonblocking pool first
  random: printk notifications for urandom pool initialization
  random: don't zap entropy count in rand_initialize()

 drivers/base/core.c    |  3 +++
 drivers/char/random.c  | 42 +++++++++++++++++++++++++++++++-----------
 include/linux/random.h |  2 ++
 3 files changed, 36 insertions(+), 11 deletions(-)

-- 
1.7.12.rc0.22.gcdd159b

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-03 23:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-03 13:33 [PATCH 0/4] random: improve entropy pool initialization at boot time Theodore Ts'o
2013-11-03 13:33 ` [PATCH 1/4] random: use device attach events for entropy Theodore Ts'o
2013-11-03 14:51   ` Greg KH
2013-11-03 18:44     ` Theodore Ts'o
2013-11-03 23:10   ` Theodore Ts'o
2013-11-03 13:33 ` [PATCH 2/4] random: make add_timer_randomness() fill the nonblocking pool first Theodore Ts'o
2013-11-03 13:33 ` [PATCH 3/4] random: printk notifications for urandom pool initialization Theodore Ts'o
2013-11-03 13:33 ` [PATCH 4/4] random: don't zap entropy count in rand_initialize() Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).