linux-stable/Documentation
Linus Torvalds 5628b8de12 Random number generator changes for Linux 5.18-rc1.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEq5lC5tSkz8NBJiCnSfxwEqXeA64FAmIzwtEACgkQSfxwEqXe
 A67NCBAA1+U01HXx4ethmmy1m2pXHAIwngI7PP0QzyZtmoloWockdN1lRfQ1C0uJ
 Whk/9Hc9G7iujznsxOnCS+LeNwRzd7CjtFbTgK+yGIRKwL9GFcVwA5nrifP9TjqZ
 FWmTIomjjmA06YRYsNOdNSQdN6DdpQz8xLw0EqVOZerI4ITFErYlW8lLqOOKY99N
 f9glQK75kh41SUgo+K3JSn46fhB95HldL6dYSZzjQ6QsVKBQuQTDE9ryfrH2XZDw
 xI2nf/ycXPUBv7Bb+0op+7ES++CoDigM2nIyxapEj3ZkpplxL4M+cCIHq3Juzfwm
 jDdbZbs5SqDszOQM/dvCJSR+S/D3QIKdv3fwwWHDTigByZdgpudT3rr9k7dY60Z8
 aNvOzNWOzGH9/0boLl55WysF6cBQnazbgtzeWpzeuWFhAyfxN/DJx2sf8U+TmN6n
 3bDUafamAvmkkIOoHUzOXfjo2lhXxlmRZ40rWVNX5JvcJj5+5jRmTawrQj+9fn8/
 MhiIZ6KBDV1OxPwJzG6jm++JP6rgXfXsxduomO7cIEWs10itf/cE8WD9qJrtZTtg
 kfjYUguFOd/QyzY0A1w6FD865vy8YhATk71Ywgwj9AI+cfH8QUajpDkXOutjop8x
 8HBxIGx6Itgzilfuo5jpJxlVhNO3G6v1fX/A+mUMAfHufkmnfiQ=
 =cyDR
 -----END PGP SIGNATURE-----

Merge tag 'random-5.18-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random

Pull random number generator updates from Jason Donenfeld:
 "There have been a few important changes to the RNG's crypto, but the
  intent for 5.18 has been to shore up the existing design as much as
  possible with modern cryptographic functions and proven constructions,
  rather than actually changing up anything fundamental to the RNG's
  design.

  So it's still the same old RNG at its core as before: it still counts
  entropy bits, and collects from the various sources with the same
  heuristics as before, and so forth. However, the cryptographic
  algorithms that transform that entropic data into safe random numbers
  have been modernized.

  Just as important, if not more, is that the code has been cleaned up
  and re-documented. As one of the first drivers in Linux, going back to
  1.3.30, its general style and organization was showing its age and
  becoming both a maintenance burden and an auditability impediment.

  Hopefully this provides a more solid foundation to build on for the
  future. I encourage you to open up the file in full, and maybe you'll
  remark, "oh, that's what it's doing," and enjoy reading it. That, at
  least, is the eventual goal, which this pull begins working toward.

  Here's a summary of the various patches in this pull:

   - /dev/urandom and /dev/random now do the same thing, per the patch
     we discussed on the list. I think this is worth trying out. If it
     does appear problematic, I've made sure to keep it standalone and
     revertible without any conflicts.

   - Fixes and cleanups for numerous integer type problems, locking
     issues, and general code quality concerns.

   - The input pool's LFSR has been replaced with a cryptographically
     secure hash function, which has security and performance benefits
     alike, and consequently allows us to count entropy bits linearly.

   - The pre-init injection now uses a real hash function too, instead
     of an LFSR or vanilla xor.

   - The interrupt handler's fast_mix() function now uses one round of
     SipHash, rather than the fake crypto that was there before.

   - All additions of RDRAND and RDSEED now go through the input pool's
     hash function, in part to mitigate ridiculous hypothetical CPU
     backdoors, but more so to have a consistent interface for ingesting
     entropy that's easy to analyze, making everything happen one way,
     instead of a potpourri of different ways.

   - The crng now works on per-cpu data, while also being in accordance
     with the actual "fast key erasure RNG" design. This allows us to
     fix several boot-time race complications associated with the prior
     dynamically allocated model, eliminates much locking, and makes our
     backtrack protection more robust.

   - Batched entropy now erases doled out values so that it's backtrack
     resistant.

   - Working closely with Sebastian, the interrupt handler no longer
     needs to take any locks at all, as we punt the
     synchronized/expensive operations to a workqueue. This is
     especially nice for PREEMPT_RT, where taking spinlocks in irq
     context is problematic. It also makes the handler faster for the
     rest of us.

   - Also working with Sebastian, we now do the right thing on CPU
     hotplug, so that we don't use stale entropy or fail to accumulate
     new entropy when CPUs come back online.

   - We handle virtual machines that fork / clone / snapshot, using the
     "vmgenid" ACPI specification for retrieving a unique new RNG seed,
     which we can use to also make WireGuard (and in the future, other
     things) safe across VM forks.

   - Around boot time, we now try to reseed more often if enough entropy
     is available, before settling on the usual 5 minute schedule.

   - Last, but certainly not least, the documentation in the file has
     been updated considerably"

* tag 'random-5.18-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random: (60 commits)
  random: check for signal and try earlier when generating entropy
  random: reseed more often immediately after booting
  random: make consistent usage of crng_ready()
  random: use SipHash as interrupt entropy accumulator
  wireguard: device: clear keys on VM fork
  random: provide notifier for VM fork
  random: replace custom notifier chain with standard one
  random: do not export add_vmfork_randomness() unless needed
  virt: vmgenid: notify RNG of VM fork and supply generation ID
  ACPI: allow longer device IDs
  random: add mechanism for VM forks to reinitialize crng
  random: don't let 644 read-only sysctls be written to
  random: give sysctl_random_min_urandom_seed a more sensible value
  random: block in /dev/urandom
  random: do crng pre-init loading in worker rather than irq
  random: unify cycles_t and jiffies usage and types
  random: cleanup UUID handling
  random: only wake up writers after zap if threshold was passed
  random: round-robin registers as ulong, not u32
  random: clear fast pool, crng, and batches in cpuhp bring up
  ...
2022-03-21 14:55:32 -07:00
..
ABI Thermal control updates for 5.18-rc1 2022-03-21 14:35:11 -07:00
accounting - A bunch of fixes: forced idle time accounting, utilization values 2022-01-23 17:35:27 +02:00
admin-guide Random number generator changes for Linux 5.18-rc1. 2022-03-21 14:55:32 -07:00
arc docs: ARC: Improve readability 2021-12-10 14:28:01 -07:00
arm Documentation: arm: marvell: Extend Avanta list 2022-01-27 11:22:34 -07:00
arm64 Merge branch 'for-next/mte' into for-next/core 2022-03-14 19:01:23 +00:00
block docs: block: remove queue-sysfs.rst 2022-01-09 18:59:10 -07:00
bpf bpf, docs: Fully document the JMP mode modifiers 2022-01-05 13:11:26 -08:00
cdrom Documentation: Fix links for udftools project and pktcdvd tool 2022-02-15 16:15:33 -07:00
core-api swiotlb: rework "fix info leak with DMA_FROM_DEVICE" 2022-03-07 11:26:02 -08:00
cpu-freq cpufreq: Reintroduce ready() callback 2022-02-09 13:18:49 +05:30
crypto
dev-tools It has been a moderately busy cycle for documentation; some of the 2022-03-21 14:13:25 -07:00
devicetree Thermal control updates for 5.18-rc1 2022-03-21 14:35:11 -07:00
doc-guide docs: discourage use of list tables 2022-01-07 09:33:13 -07:00
driver-api Thermal control updates for 5.18-rc1 2022-03-21 14:35:11 -07:00
fault-injection
fb
features ARM: 9158/1: leave it to core code to manage thread_info::cpu 2021-12-17 11:34:31 +00:00
filesystems netfs, cachefiles: Add a method to query presence of data in the cache 2022-02-01 10:29:18 -06:00
firmware-guide ACPI: docs: gpio-properties: Unify ASL style for GPIO examples 2022-03-08 20:04:51 +01:00
firmware_class
fpga
gpu Revert "fbcon: Disable accelerated scrolling" 2022-02-02 15:15:11 +01:00
hid
hwmon hwmon/pmbus: (ir38064) Add support for IR38060, IR38164 IR38263 2021-12-26 15:02:07 -08:00
i2c Docs: Fixes link to I2C specification 2021-12-31 14:39:28 +01:00
ia64
ide
iio
infiniband
input
isdn
kbuild doc: kbuild: fix default in imply table 2022-01-08 18:28:21 +09:00
kernel-hacking docs: fix typo in Documentation/kernel-hacking/locking.rst 2022-01-27 11:22:33 -07:00
leds
litmus-tests
livepatch Documentation: livepatch: Add livepatch API page 2021-12-23 11:35:53 +01:00
locking Documentation/locking/locktypes: Fix PREEMPT_RT _bh() description 2022-03-04 10:13:19 -07:00
m68k
maintainer
mhi
mips
misc-devices
netlabel
networking This isn't a hugely busy cycle for documentation, but a few significant 2022-01-11 10:00:04 -08:00
nios2
nvdimm
openrisc
parisc
PCI
pcmcia
power Merge branches 'pm-opp', 'pm-devfreq' and 'powercap' 2022-01-10 18:00:31 +01:00
powerpc
process Documentation: describe how to apply incremental stable patches 2022-03-09 16:29:44 -07:00
RCU
riscv riscv: Move KASAN mapping next to the kernel mapping 2022-01-19 17:54:04 -08:00
s390
scheduler docs: scheduler: Convert schedutil.txt to ReST 2022-03-16 15:03:24 -06:00
scsi
security docs: update self-protection __ro_after_init status 2021-12-10 14:02:06 -07:00
sh
sound ALSA: hda/realtek: Add new alc285-hp-amp-init model 2021-12-14 10:44:26 +01:00
sparc
sphinx Reword note on missing CJK fonts 2022-02-24 12:26:13 -07:00
sphinx-static docs: add support for RTD dark mode 2021-12-10 14:05:55 -07:00
spi
staging Three small documentation fixes. 2022-01-22 09:02:57 +02:00
target
timers
tools Tracing fixes for 5.17: 2022-02-26 12:10:17 -08:00
trace docs: Remove duplicated words in trace/osnoise-tracer 2022-02-24 10:42:20 -07:00
translations It has been a moderately busy cycle for documentation; some of the 2022-03-21 14:13:25 -07:00
tty
usb docs: ABI: fixed req_number desc in UAC1 2021-12-30 12:10:44 +01:00
userspace-api It has been a moderately busy cycle for documentation; some of the 2022-03-21 14:13:25 -07:00
virt It has been a moderately busy cycle for documentation; some of the 2022-03-21 14:13:25 -07:00
vm docs: fix RST error in vm/page_owner.rst 2022-02-24 12:57:10 -07:00
w1
watchdog
x86 Thermal control updates for 5.18-rc1 2022-03-21 14:35:11 -07:00
xtensa
.gitignore
arch.rst
asm-annotations.rst linkage: remove SYM_FUNC_{START,END}_ALIAS() 2022-02-22 16:21:34 +00:00
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py docs: pdfdocs: Pull LaTeX preamble part out of conf.py 2022-02-24 12:26:13 -07:00
COPYING-logo
docutils.conf
dontdiff
index.rst docs: Hook the RTLA documents into the kernel docs build 2022-01-27 11:20:39 -07:00
Kconfig
logo.gif
Makefile docs: Makefile: Add -no-shell-escape option to LATEXOPTS 2022-02-14 12:50:17 -07:00
memory-barriers.txt asm-generic: introduce io_stop_wc() and add implementation for ARM64 2021-12-22 10:44:53 +00:00
SubmittingPatches
watch_queue.rst