android_kernel_google_msm/drivers
Theodore Ts'o 095f11b227 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: stable@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I4d4ac36af58c5f3d1a5066b54afff4b8f478affd
2023-03-24 20:53:06 +01:00
..
accessibility
acpi
amba
ata
atm
auxdisplay
base mm: export NR_SHMEM via sysinfo(2) / si_meminfo() interfaces 2020-12-01 19:08:36 +01:00
bcma
block UPSTREAM: block: disable entropy contributions for nonrot devices 2018-01-01 22:06:21 +03:00
bluetooth
cdrom
char random: mix rdrand with entropy sent in from userspace 2023-03-24 20:53:06 +01:00
clk Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
clocksource sched_clock: Squashed revert of the latest updates 2018-02-20 21:56:17 +03:00
connector
coresight
cpufreq Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
cpuidle
crypto Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
dca
devfreq
dio
dma
edac
eisa
firewire
firmware
gpio Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
gpu ion: cma: Update print_debug function 2018-08-27 14:52:43 +00:00
hid Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
hsi
hv
hwmon Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
hwspinlock
i2c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
ide UPSTREAM: block: disable entropy contributions for nonrot devices 2018-01-01 22:06:21 +03:00
idle
ieee802154
infiniband Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
input enable/disable the lid sensor 2019-03-19 08:57:18 +01:00
iommu iommu: msm: Handle unmapping of PTE properly 2018-08-27 14:52:32 +00:00
isdn
leds Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
lguest
macintosh
mca
md dm-crypt: run in a WQ_HIGHPRI workqueue 2018-01-13 17:13:45 +03:00
media gpu: ion: Add support for sharing buffers with dma buf kernel handles 2018-08-27 14:52:38 +00:00
memstick
message
mfd Sound Control: (Optional) work around for WCD93xx audio issues 2019-03-16 12:46:51 +01:00
misc Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
mmc mmc: move to a SCHED_FIFO thread 2018-01-13 17:13:45 +03:00
mtd UPSTREAM: block: disable entropy contributions for nonrot devices 2018-01-01 22:06:21 +03:00
net net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq 2020-11-30 19:26:49 +03:00
nfc Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
nubus
of Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
oprofile Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
parisc
parport
pci Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
pcmcia
pinctrl
platform msm: sps: Fix race condition in SPS debugfs APIs 2018-02-16 20:15:07 -07:00
pnp
power otg+charge: detect charging while OTG enabled 2018-04-04 10:19:45 +02:00
pps
ps3
ptp
rapidio
regulator Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
remoteproc Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
rpmsg
rtc Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
s390
sbus
scsi ANDROID: scsi: Add segment checking in sg_read 2018-01-13 17:13:38 +03:00
sfi
sh
slimbus
sn
spi Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
spmi
ssb
staging flo/deb: Update Android binder 2021-11-26 22:02:17 +01:00
switch
target Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
tc
thermal Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
tty Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
uio Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
usb Merge branch 'lineage-18.1' into followmsi-11 2020-12-19 13:42:14 +01:00
uwb
vhost
video msm: vidc: prevent vcd_stop to wait for long 2018-08-27 14:52:38 +00:00
virt
virtio Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
vlynq
w1
watchdog
xen Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
zorro
Kconfig msm: gud: Remove gud driver 2018-01-13 17:13:39 +03:00
Makefile msm: gud: Remove gud driver 2018-01-13 17:13:39 +03:00