Commit b006c43
hwrng: core - start hwrng kthread also for untrusted sources
Start the hwrng kthread even if the hwrng source has a quality setting
of zero. Then, every crng reseed interval, one batch of data from this
zero-quality hwrng source will be mixed into the CRNG pool.
This patch is based on the assumption that data from a hwrng source
will not actively harm the CRNG state. Instead, many hwrng sources
(such as TPM devices), even though they are assigend a quality level of
zero, actually provide some entropy, which is good enough to mix into
the CRNG pool every once in a while.
Cc: Herbert Xu <[email protected]>
Cc: Jason A. Donenfeld <[email protected]>
Signed-off-by: Dominik Brodowski <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>1 parent 4edff84 commit b006c43
1 file changed
+10
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
99 | 108 | | |
100 | 109 | | |
101 | 110 | | |
| |||
167 | 176 | | |
168 | 177 | | |
169 | 178 | | |
170 | | - | |
171 | | - | |
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
| |||
454 | 461 | | |
455 | 462 | | |
456 | 463 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | 464 | | |
462 | 465 | | |
463 | 466 | | |
| |||
513 | 516 | | |
514 | 517 | | |
515 | 518 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | 537 | | |
554 | 538 | | |
555 | 539 | | |
| |||
0 commit comments