android_kernel_samsung_msm8976/drivers/char
Theodore Ts'o 24aab508c3 random: mix rdrand with entropy sent in from userspace
commit 81e69df38e2911b642ec121dec319fad2a4782f3 upstream.

Fedora has integrated the jitter entropy daemon to work around slow
boot problems, especially on VM's that don't support virtio-rng:

    https://bugzilla.redhat.com/show_bug.cgi?id=1572944

It's understandable why they did this, but the Jitter entropy daemon
works fundamentally on the principle: "the CPU microarchitecture is
**so** complicated and we can't figure it out, so it *must* be
random".  Yes, it uses statistical tests to "prove" it is secure, but
AES_ENCRYPT(NSA_KEY, COUNTER++) will also pass statistical tests with
flying colors.

So if RDRAND is available, mix it into entropy submitted from
userspace.  It can't hurt, and if you believe the NSA has backdoored
RDRAND, then they probably have enough details about the Intel
microarchitecture that they can reverse engineer how the Jitter
entropy daemon affects the microarchitecture, and attack its output
stream.  And if RDRAND is in fact an honest DRNG, it will immeasurably
improve on what the Jitter entropy daemon might produce.

This also provides some protection against someone who is able to read
or set the entropy seed file.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:52:57 +02:00
..
agp
diag diag: Protect the decrement of number of diag clients 2019-07-27 21:50:47 +02:00
hw_random
ipmi ipmi: move timer init to before irq is setup 2016-01-28 21:49:29 -08:00
mwave
pcmcia
tpm This is the 3.10.97 stable release 2017-04-18 17:17:20 +02:00
xilinx_hwicap
Kconfig char: lack of bool string made CONFIG_DEVPORT always on 2019-07-27 21:44:06 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00
adsprpc.c msm: adsprpc: Fix race conditions on same buffer 2019-07-27 21:50:24 +02:00
adsprpc_compat.c msm: adsprpc: Use unsigned integer for length values 2018-01-24 16:54:22 +05:30
adsprpc_compat.h
adsprpc_shared.h msm: adsprpc: Use unsigned integer for length values 2018-01-24 16:54:22 +05:30
apm-emulation.c
applicom.c
applicom.h
bfin-otp.c
bsr.c
ds1302.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
generic_nvram.c
genrtc.c
hangcheck-timer.c
hpet.c
i8k.c
knox_kap.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
lp.c
mbcs.c
mbcs.h
mem.c drivers: char: mem: Fix wraparound check to allow mappings up to the end 2019-07-27 21:44:47 +02:00
misc.c
mmtimer.c
msm_smd_pkt.c char: msm_smd_pkt: Fix the TIOCMSET IOCTL argument reading 2016-07-12 01:44:48 -07:00
mspec.c
mst_ctrl.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
ps3flash.c
random.c random: mix rdrand with entropy sent in from userspace 2019-07-27 21:52:57 +02:00
raw.c
rdbg.c
rtc.c
scx200_gpio.c
snsc.c
snsc.h
snsc_event.c
sonypi.c
tb0219.c
tile-srom.c
tlclk.c
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c virtio-console: avoid DMA from stack 2019-07-27 21:44:06 +02:00