freebsd-skq/sys/powerpc
Conrad Meyer f8e8a06d23 random(4) FenestrasX: Push root seed version to arc4random(3)
Push the root seed version to userspace through the VDSO page, if
the RANDOM_FENESTRASX algorithm is enabled.  Otherwise, there is no
functional change.  The mechanism can be disabled with
debug.fxrng_vdso_enable=0.

arc4random(3) obtains a pointer to the root seed version published by
the kernel in the shared page at allocation time.  Like arc4random(9),
it maintains its own per-process copy of the seed version corresponding
to the root seed version at the time it last rekeyed.  On read requests,
the process seed version is compared with the version published in the
shared page; if they do not match, arc4random(3) reseeds from the
kernel before providing generated output.

This change does not implement the FenestrasX concept of PCPU userspace
generators seeded from a per-process base generator.  That change is
left for future discussion/work.

Reviewed by:	kib (previous version)
Approved by:	csprng (me -- only touching FXRNG here)
Differential Revision:	https://reviews.freebsd.org/D22839
2020-10-10 21:52:00 +00:00
..
aim [PowerPC64LE] Fix AP spinup on powernv. 2020-09-23 01:56:26 +00:00
amigaone powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
booke powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
conf Create in-tree LINT files 2020-10-09 01:48:14 +00:00
cpufreq powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
fpu powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
include Get rid of sa->narg. It serves no purpose; use sa->callp->sy_narg instead. 2020-09-27 18:47:06 +00:00
mambo powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
mikrotik powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
mpc85xx powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
ofw [PowerPC64LE] Fix RTAS LE calls in pseries. 2020-09-23 04:09:02 +00:00
powermac powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
powernv [PowerPC64LE] Endian fix for opal_hmi.c 2020-09-23 01:51:01 +00:00
powerpc random(4) FenestrasX: Push root seed version to arc4random(3) 2020-10-10 21:52:00 +00:00
ps3 powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
pseries [PowerPC64LE] Fix endianness issues in phyp_vscsi. 2020-09-23 00:13:58 +00:00
psim powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00