git: kernel - Rejigger random number generator to be per-cpu 1/2
Matthew Dillon
dillon at crater.dragonflybsd.org
Sat Feb 1 23:52:12 PST 2020
commit 1cb34a03363bd4f58f6d6756fdb48f44c09d23a4
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sat Feb 1 22:55:12 2020 -0800
kernel - Rejigger random number generator to be per-cpu 1/2
* Refactor all the kernel random number generation code to
operate on a per-cpu basis. The csprng, ibaa, and l15
structures are now per-cpu.
* RDRAND now runs a periodic timer callback on all available cpus
rather than just on cpu 0, allowing rdrand data to mix on
each cpu's rng independently.
* The nrandom helper thread now chains state with an iteration
between cpus, injecting a random data buffer generated from
the previous cpu into the mix of the current.
Summary of changes:
sys/dev/crypto/hifn/hifn7751.c | 5 +-
sys/dev/crypto/rdrand/rdrand.c | 35 ++-
sys/dev/crypto/safe/safe.c | 2 +-
sys/dev/crypto/ubsec/ubsec.c | 2 +-
sys/dev/netif/oce/oce_mbox.c | 2 +-
sys/dev/netif/sbsh/if_sbsh.c | 2 +-
sys/kern/kern_memio.c | 4 +-
sys/kern/kern_nrandom.c | 474 +++++++++++++++++++++++++----------------
sys/kern/kern_proc.c | 2 +-
sys/kern/kern_uuid.c | 4 +-
sys/kern/subr_csprng.c | 90 ++------
sys/libkern/arc4random.c | 2 +-
sys/net/sppp/if_spppsubr.c | 2 +-
sys/netinet/ip_id.c | 2 +-
sys/netinet/tcp_subr.c | 2 +-
sys/sys/csprng.h | 14 +-
sys/sys/ibaa.h | 26 +++
sys/sys/random.h | 29 +--
18 files changed, 400 insertions(+), 299 deletions(-)
create mode 100644 sys/sys/ibaa.h
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1cb34a03363bd4f58f6d6756fdb48f44c09d23a4
--
DragonFly BSD source repository
More information about the Commits
mailing list