Commit 527a986
random: do not split fast init input in add_hwgenerator_randomness()
add_hwgenerator_randomness() tries to only use the required amount of input
for fast init, but credits all the entropy, rather than a fraction of
it. Since it's hard to determine how much entropy is left over out of a
non-unformly random sample, either give it all to fast init or credit
it, but don't attempt to do both. In the process, we can clean up the
injection code to no longer need to return a value.
Signed-off-by: Jan Varho <jan.varho@gmail.com>
[Jason: expanded commit message]
Fixes: 73c7733 ("random: do not throw away excess input to crng_fast_load")
Cc: stable@vger.kernel.org # 5.17+, requires af704c8
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>1 parent 3123109 commit 527a986
1 file changed
Lines changed: 6 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | 440 | | |
444 | | - | |
| 441 | + | |
445 | 442 | | |
446 | 443 | | |
447 | 444 | | |
| |||
452 | 449 | | |
453 | 450 | | |
454 | 451 | | |
455 | | - | |
| 452 | + | |
456 | 453 | | |
457 | 454 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | 455 | | |
462 | 456 | | |
463 | 457 | | |
464 | 458 | | |
465 | 459 | | |
466 | | - | |
| 460 | + | |
467 | 461 | | |
468 | 462 | | |
469 | 463 | | |
| |||
474 | 468 | | |
475 | 469 | | |
476 | 470 | | |
477 | | - | |
478 | | - | |
479 | 471 | | |
480 | 472 | | |
481 | 473 | | |
| |||
1141 | 1133 | | |
1142 | 1134 | | |
1143 | 1135 | | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
1148 | | - | |
1149 | | - | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1150 | 1139 | | |
1151 | 1140 | | |
1152 | 1141 | | |
| |||
0 commit comments