History log of /dflybsd-src/sys/dev/crypto/rdrand/rdrand.c (Results 1 – 11 of 11)
Revision Date Author Comments
# 91dc43dd 27-Feb-2020 Matthew Dillon <dillon@apollo.backplane.com>

flame_graph - Add initial code to support flame graphs

* Add better PC sampling code to the kernel, capable of generating
call stack traces.

* Implement an initial flame_graph utility.

flame_g

flame_graph - Add initial code to support flame graphs

* Add better PC sampling code to the kernel, capable of generating
call stack traces.

* Implement an initial flame_graph utility.

flame_graph > /tmp/x.out &
(let it run a while)

flame_graph -p < /tmp/x.out

Requested-by: mjg

show more ...


# f1af7853 14-Feb-2020 Matthew Dillon <dillon@apollo.backplane.com>

rdrand - Document massive improvement in performance

* Document the huge difference going from 512 to 16 bytes. General
system performance is improved by 9.3% on a TR3990X.

This is not entirel

rdrand - Document massive improvement in performance

* Document the huge difference going from 512 to 16 bytes. General
system performance is improved by 9.3% on a TR3990X.

This is not entirely the fault of rdrand. It is also in a large
part due to the overhead of add_buffer_randomness().

show more ...


# df5c0f32 14-Feb-2020 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Reduce excessive rdrand harvesting

* Our rdrand driver harvests 512 bytes on each cpu thread at a rate
of 10hz. Ryzen CPUs appear to burn about 0.73uS per word, creating
an overhead of

kernel - Reduce excessive rdrand harvesting

* Our rdrand driver harvests 512 bytes on each cpu thread at a rate
of 10hz. Ryzen CPUs appear to burn about 0.73uS per word, creating
an overhead of about 460uS/sec on EACH cpu thread in the system.

When added to the even higher overhead of the add_buffer_randomness()
call, the result was a roughly 3% loss of performance across the board.

* Reduce the harvest size to 16 bytes, which honestly is still plenty
of entropy to inject.

* Change some symbolic branch targets to local branch targets in the
rdrand and padlock code to avoid generating symbols that can cause
weird output in our PC sampler (I was getting 'loop+N' and 'out+N'
while testing the above).

show more ...


# 1cb34a03 02-Feb-2020 Matthew Dillon <dillon@apollo.backplane.com>

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 p

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.

show more ...


# eb67213a 26-Mar-2019 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Rewrite the callout_*() API

* Rewrite the entire API from scratch and improve compatibility
with FreeBSD. This is not an attempt to achieve full API compatibility,
as FreeBSD's API has

kernel - Rewrite the callout_*() API

* Rewrite the entire API from scratch and improve compatibility
with FreeBSD. This is not an attempt to achieve full API compatibility,
as FreeBSD's API has unnecessary complexity that coders would frequently
make mistakes interpreting.

* Remove the IPI mechanisms in favor of fine-grained spin-locks instead.

* Add some robustness features in an attempt to track down corrupted
callwheel lists due to originating subsystems freeing structures out
from under an active callout.

* The code supports a full-blown type-stable/adhoc-reuse structural
separation between the front-end and the back-end, but this feature
is currently not operational and may be removed at some future point.
Instead we currently just embed the struct _callout inside the
struct callout.

* Replace callout_stop_sync() with callout_cancel().

* callout_drain() is now implemented as a synchronous cancel instead
of an asynchronous stop, which is closer to the FreeBSD API and
expected operation for ported code (usb stack in particular). We
will just have to fix any deadlocks which we come across.

* Retain our callout_terminate() function as the 'better' way to
stop using a callout, as it will not only cancel the callout but
also de-flag the structure so it can no longer be used.

show more ...


# 790110cd 14-Jul-2014 Alex Hornung <alex@alexhornung.com>

kern_nrandom, rnd drivers: update for new CSPRNG

* Identify each source of entropy with an identifier, so that
for example the Fortuna CSPRNG can manage the pool index
for each source.

* Ad

kern_nrandom, rnd drivers: update for new CSPRNG

* Identify each source of entropy with an identifier, so that
for example the Fortuna CSPRNG can manage the pool index
for each source.

* Add a new sysctl, kern.rand_mode, which can be used to select
which generator is used for /dev/random; valid values are:
- csprng (to use only the Fortuna-based CSPRNG)
- ibaa (to use only IBAA)
- mixed (to XOR both csprng and ibaa in the output stream
It defaults to "mixed".

show more ...


# af8b80e4 26-Feb-2014 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix bug in last rdrand commit

* Fix incorrect sizeof() that I introduced.

Reported-by: alexh


# 51a4a9a0 25-Feb-2014 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix bugs in rdrand, change sampling frequency

* Fix bugs in the rdrand assembly. %ebx/%rbx is a call-saved register and
cannot be destroyed. For 64-bit use %r11 which is a temporary reg

kernel - Fix bugs in rdrand, change sampling frequency

* Fix bugs in the rdrand assembly. %ebx/%rbx is a call-saved register and
cannot be destroyed. For 64-bit use %r11 which is a temporary register.

* Increase the rdrand.c frequency from 1Hz to 10Hz

* add the debug.rdrand sysctl

* Use add_buffer_randomness() instead of add_true_randomness().

show more ...


# fa8cc5a2 19-Jul-2013 Sascha Wildner <saw@online.de>

kernel: Remove some more unused kmalloc types.

M_MPSSAS
M_MPTUSER
M_NETGRAPH_ITEM
M_NWFSMNT
M_PDU
M_RDRAND
M_SMBDATA
M_SMBFSMNT


# d3c9c58e 20-Feb-2013 Sascha Wildner <saw@online.de>

kernel: Use DEVMETHOD_END in the drivers.


# 83c37607 25-Feb-2012 Alex Hornung <ahornung@gmail.com>

rdrand - An RNG driver for the RdRand insn

* The driver is as of yet untested as the hardware is not yet
available!