kernel_optimize_test/drivers/char
Willy Tarreau f227e3ec3b random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.

Note that depending on some network devices' interrupt rate moderation
or binding, this re-seeding might happen on every packet or even almost
never.

In addition, with NOHZ some CPUs might not even get timer interrupts,
leaving their local state rarely updated, while they are running
networked processes making use of the random state.  For this reason, we
also perform this update in update_process_times() in order to at least
update the state when there is user or system activity, since it's the
only case we care about.

Reported-by: Amit Klein <aksecurity@gmail.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Eric Dumazet <edumazet@google.com>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-07-29 10:35:37 -07:00
..
agp treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
hw_random hwrng: ks-sa - Fix runtime PM imbalance on error 2020-06-15 17:38:53 +10:00
ipmi IPMI update for 5.8 2020-06-05 13:58:04 -07:00
mwave
pcmcia cm4000_cs.c cmm_ioctl(): get rid of pointless access_ok() 2020-05-29 11:04:56 -04:00
tpm Revert commit e918e57041 ("tpm_tis: Remove the HID IFX0102") 2020-07-07 04:25:17 +03:00
xilinx_hwicap
xillybus
adi.c
apm-emulation.c
applicom.c
applicom.h
bsr.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
ds1620.c
dsp56k.c
dtlk.c
hangcheck-timer.c
hpet.c
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
lp.c
Makefile
mem.c /dev/mem: Add missing memory barriers for devmem_inode 2020-07-23 09:47:13 +02:00
misc.c
mspec.c mmap locking API: convert mmap_sem comments 2020-06-09 09:39:14 -07:00
nsc_gpio.c
nvram.c nvram: drop useless access_ok() 2020-05-29 11:03:30 -04:00
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c
ppdev.c
ps3flash.c
random.c random32: update the net random state on interrupt and activity 2020-07-29 10:35:37 -07:00
raw.c
scx200_gpio.c
sonypi.c
tb0219.c
tlclk.c
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial 2020-07-10 15:12:48 +02:00