random: schedule mix_interrupt_randomness() less often
Jason A. Donenfeld authored
commit 534d2eaf upstream.

It used to be that mix_interrupt_randomness() would credit 1 bit each
time it ran, and so add_interrupt_randomness() would schedule mix() to
run every 64 interrupts, a fairly arbitrary number, but nonetheless
considered to be a decent enough conservative estimate.

Since e3e33fc2 ("random: do not use input pool from hard IRQs"),
mix() is now able to credit multiple bits, depending on the number of
calls to add(). This was done for reasons separate from this commit, but
it has the nice side effect of enabling this patch to schedule mix()
less often.

Currently the rules are:
a) Credit 1 bit for every 64 calls to add().
b) Schedule mix() once a second that add() is called.
c) Schedule mix() once every 64 calls to add().

Rules (a) and (c) no longer need to be coupled. It's still important to
have _some_ value in (c), so that we don't "over-saturate" the fast
pool, but the once per second we ...
1df5178f
Name Last commit Last update
Documentation Revert "hwmon: Make chip parameter for with_info API mandatory"
LICENSES LICENSES: Rename other to deprecated
arch arm64: mm: Don't invalidate FROM_DEVICE buffers at start of DMA transfer
block block: fix bio_clone_blkg_association() to associate with proper blkcg_gq
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous
drivers random: schedule mix_interrupt_randomness() less often
fs ext4: add reserved GDT blocks check
include vt: drop old FONT ioctls
init random: handle latent entropy and command line from random_init()
ipc ipc/mqueue: use get_tree_nodev() in mqueue_get_tree()
kernel dma-debug: make things less spammy under memory pressure
lib random: remove ratelimiting for in-kernel unseeded randomness
mm random: move randomize_page() into mm where it belongs
net tcp: drop the hash_32() part from the index calculation
samples samples/kretprobes: Fix return value if register_kretprobe() failed
scripts faddr2line: Fix overlapping text section failures, the sequel
security efi: Do not import certificates from UEFI Secure Boot for T2 Macs
sound ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machine
tools netfilter: nat: really support inet nat without l3 address
usr initramfs: restore default compression behavior
virt KVM: Prevent module exit until all VMs are freed
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.