diff options
| author | imoseyon <imoseyon@gmail.com> | 2014-12-13 16:39:49 -0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:57:23 +0200 |
| commit | d3d3c80eb781a34798671522c8745efc70afd0bd (patch) | |
| tree | 8d010086fbb55a51cc51f408709528e649997165 /lib/random32.c | |
| parent | 2b5b3ab5658de1467d060b684b7c6c04e65bf393 (diff) | |
random32: use e/frandom for reseeding, and a merge fixup
Diffstat (limited to 'lib/random32.c')
| -rw-r--r-- | lib/random32.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/random32.c b/lib/random32.c index 0bee183fa..d7a628a61 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -151,8 +151,7 @@ static u32 __extract_hwseed(void) { unsigned int val = 0; - (void)(arch_get_random_seed_int(&val) || - arch_get_random_int(&val)); + (void)(arch_get_random_int(&val)); return val; } @@ -271,7 +270,7 @@ static void __prandom_reseed(bool late) struct rnd_state *state = &per_cpu(net_rand_state,i); u32 seeds[4]; - get_random_bytes(&seeds, sizeof(seeds)); + erandom_get_random_bytes((char *)&seeds, sizeof(seeds)); state->s1 = __seed(seeds[0], 2U); state->s2 = __seed(seeds[1], 8U); state->s3 = __seed(seeds[2], 16U); |
