diff options
| author | imoseyon <imoseyon@gmail.com> | 2014-12-13 16:39:49 -0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-10 12:06:49 +0200 |
| commit | 28dcd63ec88da85c14041e1c737a89a8ac8b4dfd (patch) | |
| tree | f6a10ab6ecd8a68f6886498811bd66234cfbf447 | |
| parent | f9f7622978518d7a17e880e3519742d690b89ba5 (diff) | |
random32: use e/frandom for reseeding, and a merge fixup
| -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); |
