Skip to content

prandom fixes/improvements

Daniel Borkmann linux-wireless netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6random32: fix off-by-one in seeding requirementinclude/linux/random.h lib/random32.c+10 -100 replies
2/6random32: add periodic reseedinglib/random32.c+23 -00 replies
3/6random32: add prandom_reseed_late() and call when nonblocking pool becomes initializeddrivers/char/random.c include/linux/random.h lib/random32.c+27 -219 replies
4/6random32: move rnd_state to linux/random.hinclude/linux/random.h include/uapi/linux/random.h+4 -70 replies
5/6random32: upgrade taus88 generator to taus113 from errata paperinclude/linux/random.h lib/random32.c+52 -390 replies
6/6random32: add test cases for taus113 implementationlib/Kconfig lib/random32.c+196 -60 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchTheodore Ts'o
1/6
2/6
3/6A-b
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/6] prandom fixes/improvements

Hi Dave,

It would be great if you could still consider this series that fixes and improves prandom for 3.13. We have sent it to netdev as prandom() originally came from net/core/utils.c and networking is its main user. For a detailled description, please see individual patches.

For patch 3 in this series, there will be a minor merge conflict with the random tree that is for 3.13. See below how to resolve it.

====
Hannes says: on merge with the random tree I would suggest to resolve the conflict in drivers/char/random.c like this:

if (r->entropy_total > 128) {
	r->initialized = 1;
	r->entropy_total = 0;
	if (r == &nonblocking_pool) {
		prandom_reseed_late();
		pr_notice("random: %s pool is initialized\n",
			  r->name);
	}
}

So it won't generate a warning if DEBUG_RANDOM_BOOT gets activated.
====

Patch 1 should probably also go to -stable.

Set tested on 32 and 64 bit machines.

Thanks a lot!

Ref. original discussion: http://patchwork.ozlabs.org/patch/289951/

Daniel Borkmann (4):
random32: fix off-by-one in seeding requirement
random32: move rnd_state to linux/random.h
random32: upgrade taus88 generator to taus113 from errata paper
random32: add test cases for taus113 implementation

Hannes Frederic Sowa (2):
random32: add periodic reseeding
random32: add prandom_reseed_late() and call when nonblocking pool
becomes initialized

 drivers/char/random.c       |   5 +-
 include/linux/random.h      |  14 +-
 include/uapi/linux/random.h |   7 -
 lib/Kconfig                 |   7 +
 lib/random32.c              | 307 +++++++++++++++++++++++++++++++++++++++-----
 5 files changed, 294 insertions(+), 46 deletions(-)
Signature · 1 line
1.8.3.1