Backport 5.10.119 LTS patches from upstream. git cherry-pick v5.10.118..v5.10.119~1 -s
Already merged(-4): a8f4d63142f9 lockdown: also lock down previous kgdb use 9b4aa0d80b18 KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID 33f1b4a27abc tcp: change source port randomizarion at connect() time a5c68f457fbf secure_seq: use the 64 bits of the siphash for port offset calculation
Context conflict: 07918ddba3ab lib/crypto: sha1: re-roll loops to reduce code size 685200b076ff random: use BLAKE2s instead of SHA1 in extraction 7d9eab78bed9 init: call time_init() before rand_initialize()
Temporarily Reverted(+1): Revert "alinux: random: speed up the initialization of module"
KABI changed(2): 5064550d422dc random: clear fast pool, crng, and batches in cpuhp bring up 07280d2c3f33d random: make more consistent use of integer types
KABI fixes(+2): random: Fix kabi change due to enum cpuhp_state random: Fix kabi change of get_random_bytes()
Total patches: 163 - 4 + 1 + 2 = 162
Andy Shevchenko (1): ACPI: sysfs: Make sparse happy about address space in use
Ard Biesheuvel (1): random: avoid arch_get_random_seed_long() when collecting IRQ randomness
Denis Efremov (Oracle) (1): staging: rtl8723bs: prevent ->Ssid overflow in rtw_wx_set_scan()
Dominik Brodowski (7): random: harmonize "crng init done" messages random: early initialization of ChaCha constants random: continually use hwgenerator randomness random: access primary_pool directly rather than through pointer random: only call crng_finalize_init() for primary_crng random: fix locking in crng_fast_load() random: fix locking for crng_init in crng_reseed()
Edward Matijevic (1): ALSA: ctxfi: Add SB046x PCI ID
Eric Biggers (11): random: remove dead code left over from blocking pool crypto: blake2s - define shash_alg structs using macros crypto: x86/blake2s - define shash_alg structs using macros crypto: blake2s - remove unneeded includes crypto: blake2s - move update and final logic to internal/blake2s.h crypto: blake2s - share the "shash" API boilerplate code crypto: blake2s - optimize blake2s initialization crypto: blake2s - add comment for blake2s_state fields crypto: blake2s - adjust include guard naming crypto: blake2s - include <linux/bug.h> instead of <asm/bug.h> random: remove use_input_pool parameter from crng_reseed()
Hans Verkuil (1): media: vim2m: initialize the media device earlier
Herbert Xu (1): crypto: lib/blake2s - Move selftest prototype into header file
Jan Varho (1): random: do not split fast init input in add_hwgenerator_randomness()
Jann Horn (2): random: don't reset crng_init_cnt on urandom_read() random: check for signal_pending() outside of need_resched() check
Jason A. Donenfeld (123): MAINTAINERS: co-maintain random.c MAINTAINERS: add git tree for random.c lib/crypto: blake2s: include as built-in lib/crypto: blake2s: move hmac construction into wireguard lib/crypto: sha1: re-roll loops to reduce code size lib/crypto: blake2s: avoid indirect calls to compression function for Clang CFI random: use BLAKE2s instead of SHA1 in extraction random: do not sign extend bytes for rotation when mixing random: do not re-init if crng_reseed completes before primary init random: mix bootloader randomness into pool random: use IS_ENABLED(CONFIG_NUMA) instead of ifdefs random: avoid superfluous call to RDRAND in CRNG extraction random: cleanup poolinfo abstraction random: cleanup integer types random: remove incomplete last_data logic random: remove unused extract_entropy() reserved argument random: rather than entropy_store abstraction, use global random: remove unused OUTPUT_POOL constants random: de-duplicate INPUT_POOL constants random: prepend remaining pool constants with POOL_ random: cleanup fractional entropy shift constants random: access input_pool_data directly rather than through pointer random: selectively clang-format where it makes sense random: simplify arithmetic function flow in account() random: use computational hash for entropy extraction random: simplify entropy debiting random: use linear min-entropy accumulation crediting random: always wake up entropy writers after extraction random: make credit_entropy_bits() always safe random: remove batched entropy locking random: use RDSEED instead of RDRAND in entropy extraction random: get rid of secondary crngs random: inline leaves of rand_initialize() random: ensure early RDSEED goes through mixer on init random: do not xor RDRAND when writing into /dev/random random: absorb fast pool into input pool after fast load random: use simpler fast key erasure flow on per-cpu keys random: use hash function for crng_slow_load() random: make more consistent use of integer types random: remove outdated INT_MAX >> 6 check in urandom_read() random: zero buffer after reading entropy from userspace random: tie batched entropy generation to base_crng generation random: remove ifdef'd out interrupt bench random: remove unused tracepoints random: add proper SPDX header random: deobfuscate irq u32/u64 contributions random: introduce drain_entropy() helper to declutter crng_reseed() random: remove useless header comment random: remove whitespace and reorder includes random: group initialization wait functions random: group crng functions random: group entropy extraction functions random: group entropy collection functions random: group userspace read/write functions random: group sysctl functions random: rewrite header introductory comment random: defer fast pool mixing to worker random: do not take pool spinlock at boot random: unify early init crng load accounting random: check for crng_init == 0 in add_device_randomness() random: pull add_hwgenerator_randomness() declaration into random.h random: clear fast pool, crng, and batches in cpuhp bring up random: round-robin registers as ulong, not u32 random: only wake up writers after zap if threshold was passed random: cleanup UUID handling random: unify cycles_t and jiffies usage and types random: do crng pre-init loading in worker rather than irq random: give sysctl_random_min_urandom_seed a more sensible value random: don't let 644 read-only sysctls be written to random: replace custom notifier chain with standard one random: use SipHash as interrupt entropy accumulator random: make consistent usage of crng_ready() random: reseed more often immediately after booting random: check for signal and try earlier when generating entropy random: skip fast_init if hwrng provides large chunk of entropy random: treat bootloader trust toggle the same way as cpu trust toggle random: re-add removed comment about get_random_{u32,u64} reseeding random: mix build-time latent entropy into pool at init random: do not allow user to keep crng key around on stack random: check for signals every PAGE_SIZE chunk of /dev/[u]random random: allow partial reads if later user copies fail random: make random_get_entropy() return an unsigned long random: document crng_fast_key_erasure() destination possibility random: fix sysctl documentation nits init: call time_init() before rand_initialize() ia64: define get_cycles macro for arch-override s390: define get_cycles macro for arch-override parisc: define get_cycles macro for arch-override alpha: define get_cycles macro for arch-override powerpc: define get_cycles macro for arch-override timekeeping: Add raw clock fallback for random_get_entropy() m68k: use fallback for random_get_entropy() instead of zero riscv: use fallback for random_get_entropy() instead of zero mips: use fallback for random_get_entropy() instead of just c0 random arm: use fallback for random_get_entropy() instead of zero nios2: use fallback for random_get_entropy() instead of zero x86/tsc: Use fallback for random_get_entropy() instead of zero um: use fallback for random_get_entropy() instead of zero sparc: use fallback for random_get_entropy() instead of zero xtensa: use fallback for random_get_entropy() instead of zero random: insist on random_get_entropy() existing in order to simplify random: do not use batches when !crng_ready() random: use first 128 bits of input as fast init random: do not pretend to handle premature next security model random: order timer entropy functions below interrupt functions random: do not use input pool from hard IRQs random: help compiler out with fast_mix() by using simpler arguments siphash: use one source of truth for siphash permutations random: use symbolic constants for crng_init states random: avoid initializing twice in credit race random: move initialization out of reseeding hot path random: remove ratelimiting for in-kernel unseeded randomness random: use proper jiffies comparison macro random: handle latent entropy and command line from random_init() random: credit architectural init the exact amount random: use static branch for crng_ready() random: remove extern from functions in header random: use proper return types on get_random_{int,long}_wait() random: make consistent use of buf and len random: move initialization functions out of hot pages random: move randomize_page() into mm where it belongs random: unify batched entropy implementations random: check for signals after page of pool writes
Jens Axboe (3): random: convert to using fops->read_iter() random: convert to using fops->write_iter() random: wire up fops->splice_{read,write}_iter()
Lorenzo Pieralisi (1): ACPI: sysfs: Fix BERT error region memory mapping
Mark Brown (1): random: document add_hwgenerator_randomness() with other input functions
Sakari Ailus (1): media: vim2m: Register video device after setting up internals
Schspa Shi (1): random: fix typo in comments
Sebastian Andrzej Siewior (1): random: remove unused irq_flags argument from add_interrupt_randomness()
Vitaly Kuznetsov (1): KVM: x86: Properly handle APF vs disabled LAPIC situation
Zheng Zengkai (3): Revert "alinux: random: speed up the initialization of module" random: Fix kabi change due to enum cpuhp_state random: Fix kabi change of get_random_bytes()
.../admin-guide/kernel-parameters.txt | 6 + Documentation/admin-guide/sysctl/kernel.rst | 22 +- MAINTAINERS | 2 + arch/alpha/include/asm/timex.h | 1 + arch/arm/include/asm/timex.h | 1 + arch/ia64/include/asm/timex.h | 1 + arch/m68k/include/asm/timex.h | 2 +- arch/mips/include/asm/timex.h | 17 +- arch/nios2/include/asm/timex.h | 3 + arch/parisc/include/asm/timex.h | 3 +- arch/powerpc/include/asm/timex.h | 1 + arch/riscv/include/asm/timex.h | 2 +- arch/s390/include/asm/timex.h | 1 + arch/sparc/include/asm/timex_32.h | 4 +- arch/um/include/asm/timex.h | 9 +- arch/x86/crypto/Makefile | 4 +- arch/x86/crypto/blake2s-glue.c | 166 +- arch/x86/crypto/blake2s-shash.c | 77 + arch/x86/include/asm/timex.h | 9 + arch/x86/include/asm/tsc.h | 7 +- arch/x86/kernel/cpu/mshyperv.c | 2 +- arch/x86/kvm/lapic.c | 6 + arch/x86/kvm/x86.c | 2 +- arch/xtensa/include/asm/timex.h | 6 +- crypto/Kconfig | 3 +- crypto/blake2s_generic.c | 158 +- crypto/drbg.c | 17 +- drivers/acpi/sysfs.c | 23 +- drivers/char/Kconfig | 3 +- drivers/char/hw_random/core.c | 1 + drivers/char/random.c | 3036 ++++++----------- drivers/hv/vmbus_drv.c | 2 +- drivers/media/test-drivers/vim2m.c | 22 +- drivers/net/Kconfig | 1 - drivers/net/wireguard/noise.c | 45 +- .../staging/rtl8723bs/os_dep/ioctl_linux.c | 6 +- include/crypto/blake2s.h | 66 +- include/crypto/chacha.h | 15 +- include/crypto/drbg.h | 2 +- include/crypto/internal/blake2s.h | 123 +- include/linux/hw_random.h | 2 - include/linux/mm.h | 1 + include/linux/prandom.h | 23 +- include/linux/random.h | 102 +- include/linux/siphash.h | 28 + include/linux/timex.h | 10 +- include/trace/events/random.h | 330 -- init/main.c | 13 +- kernel/irq/handle.c | 2 +- kernel/time/timekeeping.c | 15 + kernel/workqueue.c | 8 + lib/Kconfig.debug | 3 +- lib/crypto/Kconfig | 23 +- lib/crypto/Makefile | 9 +- lib/crypto/blake2s-generic.c | 6 +- lib/crypto/blake2s-selftest.c | 33 +- lib/crypto/blake2s.c | 81 +- lib/random32.c | 16 +- lib/sha1.c | 95 +- lib/siphash.c | 32 +- lib/vsprintf.c | 10 +- mm/util.c | 32 + sound/pci/ctxfi/ctatc.c | 2 + sound/pci/ctxfi/cthardware.h | 3 +- 64 files changed, 1739 insertions(+), 3017 deletions(-) create mode 100644 arch/x86/crypto/blake2s-shash.c delete mode 100644 include/trace/events/random.h