Whamcloud - gitweb
LU-9859 libcfs: replace cfs_srand() calls with add_device_randomness(). 70/34170/5
authorNeilBrown <neilb@suse.com>
Mon, 4 Feb 2019 17:54:41 +0000 (12:54 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 18 Feb 2019 06:38:47 +0000 (06:38 +0000)
commited5acd09263b0bfbac1bc6b26bb6e366d14a8408
treec7065bc29b08b5d82b5563f3ba5b9509727f512a
parent8dc7d07a22e8e191eddb9f0484823f85c7e67abb
LU-9859 libcfs: replace cfs_srand() calls with add_device_randomness().

The only places that cfs_srand is called, the random bits are
mixed with bits from get_random_bytes().  So it is equally effective
to add entropy to either pool.
So we can replace calls to cfs_srand() with calls that add the
entropy with add_device_randomness().  That function adds time-based
entropy, so we can discard the ktime_get_ts64 calls.

One location in lustre_handles.c only adds time based
entropy. This cannot improve the entropy provided by
get_random_bytes(), so just discard that call.

Linux-commit: 30f4236aafa81722490e74ded48a9fb2aff013ab

Change-Id: If1a8ffad05fcc89272136949300f6512dca39704
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-on: https://review.whamcloud.com/34170
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/router.c
lustre/llite/super25.c
lustre/obdclass/lustre_handles.c