diff options
| author | Jason A. Donenfeld <[email protected]> | 2022-09-27 09:35:16 +0000 |
|---|---|---|
| committer | Jason A. Donenfeld <[email protected]> | 2022-09-29 19:37:27 +0000 |
| commit | 37608ba315a2b1b548aa5b1064e5559e029cb016 (patch) | |
| tree | 8b4b2cd0188f9753c1b35eb0bd1c185bb913237a /lib/debugobjects.c | |
| parent | random: use init_utsname() instead of utsname() (diff) | |
| download | kernel-37608ba315a2b1b548aa5b1064e5559e029cb016.tar.gz kernel-37608ba315a2b1b548aa5b1064e5559e029cb016.zip | |
utsname: contribute changes to RNG
On some small machines with little entropy, a quasi-unique hostname is
sometimes a relevant factor. I've seen, for example, 8 character
alpha-numeric serial numbers. In addition, the time at which the hostname
is set is usually a decent measurement of how long early boot took. So,
call add_device_randomness() on new hostnames, which feeds its arguments
to the RNG in addition to a fresh cycle counter.
Low cost hooks like this never hurt and can only ever help, and since
this costs basically nothing for an operation that is never a fast path,
this is an overall easy win.
Cc: Andrew Morton <[email protected]>
Cc: Dominik Brodowski <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
