Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/hifn7751var.h
RevisionDateAuthorComments
 1.18  03-Dec-2021  andvar fix various typos in comments, log messages and documentation.
 1.17  17-May-2020  riastradh Rework hifn(4) RNG logic.

Previously we would read 34 bits of entropy into the pool and stop,
never to try again. This change finishes the conversion to an
on-demand source, although we still use a callout to (a) try again in
another second if the 7811 FIFO was emptied, and (b) wait at least
0.4 sec after we start the RNG to read anything from it as the
alleged documentation allegedly recommends.
 1.16  17-May-2020  riastradh Tweak locking and use a pool cache for commands and dmamaps.

This is enough to get the crypto decelerator working in LOCKDEBUG;
previously it would crash the moment you looked at it.
 1.15  17-May-2020  riastradh Merge updates from OpenBSD's hifn(4) crypto decelerator driver.

Highlights:

- Apply a ten-year-old fix to the driver's misuse of previously
exposed ciphertext as IV for the next ciphertext with CBC.

(Someone^TM should make sure there are no other drivers still doing
this...)

- Various zeroing of buffers.

- Various minor cosmetic changes.
 1.14  17-May-2020  riastradh Reduce diffs from OpenBSD hifn(4) header files.
 1.13  17-May-2020  riastradh De-#ifdef __OpenBSD__ify hifn7751.c.

Not really helpful; we can just use diff3 to merge updates.
 1.12  14-Apr-2015  riastradh Include <sys/rndsource.h> where it is actually used.

I had removed <sys/rnd.h> from files that didn't mention anything of
the rnd(9) API. But they included other files which assumed
<sys/rnd.h> had already been included.
 1.11  03-Jan-2014  pgoyette branches: 1.11.6;
Modularize
 1.10  13-Jun-2013  tls branches: 1.10.2;
Convert the entropy pool framework from pseudo-callout-driven to
soft interrupt driven operation.

Add a polling mode of operation -- now we can ask hardware random number
generators to top us up just when we need it (bcm2835_rng and amdpm
converted as examples).

Fix a stall noticed with repeated reads from /dev/random while testing.
 1.9  27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.8  19-Nov-2011  tls branches: 1.8.8;
First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>. This change includes
the following:

An initial cleanup and minor reorganization of the entropy pool
code in sys/dev/rnd.c and sys/dev/rndpool.c. Several bugs are
fixed. Some effort is made to accumulate entropy more quickly at
boot time.

A generic interface, "rndsink", is added, for stream generators to
request that they be re-keyed with good quality entropy from the pool
as soon as it is available.

The arc4random()/arc4randbytes() implementation in libkern is
adjusted to use the rndsink interface for rekeying, which helps
address the problem of low-quality keys at boot time.

An implementation of the FIPS 140-2 statistical tests for random
number generator quality is provided (libkern/rngtest.c). This
is based on Greg Rose's implementation from Qualcomm.

A new random stream generator, nist_ctr_drbg, is provided. It is
based on an implementation of the NIST SP800-90 CTR_DRBG by
Henric Jungheim. This generator users AES in a modified counter
mode to generate a backtracking-resistant random stream.

An abstraction layer, "cprng", is provided for in-kernel consumers
of randomness. The arc4random/arc4randbytes API is deprecated for
in-kernel use. It is replaced by "cprng_strong". The current
cprng_fast implementation wraps the existing arc4random
implementation. The current cprng_strong implementation wraps the
new CTR_DRBG implementation. Both interfaces are rekeyed from
the entropy pool automatically at intervals justifiable from best
current cryptographic practice.

In some quick tests, cprng_fast() is about the same speed as
the old arc4randbytes(), and cprng_strong() is about 20% faster
than rnd_extract_data(). Performance is expected to improve.

The AES code in src/crypto/rijndael is no longer an optional
kernel component, as it is required by cprng_strong, which is
not an optional kernel component.

The entropy pool output is subjected to the rngtest tests at
startup time; if it fails, the system will reboot. There is
approximately a 3/10000 chance of a false positive from these
tests. Entropy pool _input_ from hardware random numbers is
subjected to the rngtest tests at attach time, as well as the
FIPS continuous-output test, to detect bad or stuck hardware
RNGs; if any are detected, they are detached, but the system
continues to run.

A problem with rndctl(8) is fixed -- datastructures with
pointers in arrays are no longer passed to userspace (this
was not a security problem, but rather a major issue for
compat32). A new kernel will require a new rndctl.

The sysctl kern.arandom() and kern.urandom() nodes are hooked
up to the new generators, but the /dev/*random pseudodevices
are not, yet.

Manual pages for the new kernel interfaces are forthcoming.
 1.7  11-Dec-2005  christos branches: 1.7.110;
merge ktrace-lwp.
 1.6  15-Oct-2005  tls Add support for the hardware random number generator on the Hifn 7811
and 795x. This was present in the driver before, but disabled due to
problems with the actual randomness of generated numbers on the
ubiquitious 7900-series parts. The code here is far, far more
conservative than anyone else's driver for this RNG is -- but I
believe that conservatism is called for, because the 79xx RNG
design is missing a number of pieces from Hifn's "reference" 6500
RNG, and thus the numbers it generates must be treated with some
care.

Support for the 7811 RNG (which is a full-fledged 6500 type
generator) is pretty much the same here as in other variants of
this driver, except that it uses Hifn's "worst case" estimate of
actual entropy per output bit, so it will accumulate bits much
more slowly. The 7811 support is untested.
 1.5  27-Feb-2005  perry branches: 1.5.4;
nuke trailing whitespace
 1.4  16-Nov-2003  jonathan branches: 1.4.8; 1.4.10;
Support symmetric crypto ops, including AES, on hifn 7955 and 7956.
Not tested on 795[56], but compiles and matches FreeBSD-tested diffs.

Suggested by Sam Leffler <sam@errno.com>, as imported into FreeBSD by Sam.
Submitted to FreeBSD by Rajesh Vaidyanath <RVaidyanath@hifn.com>.
 1.3  30-Jul-2003  jonathan Discard previous driver; it didnt really do anything.

Replace with a new from-scratch port of recent OpenBSD hifn7751 source,
with changes to the crypto-framework calls to fit Sam Leffler's rework.
(Some of the attach-time changes from the previous driver were carried over).
Many thanks to Quentin Garnier (cube@cubidou.net) for testing an pre-release
of the driver and finding a couple of missing initializations.

Note that RNG support is temporarily disabled, until a potential issue
with RNG quality is investigated and resolved.
 1.2  13-May-2003  wiz branches: 1.2.2;
Typos from Jean-Francois Brousseau, via jmc@openbsd.
 1.1  12-Oct-2000  itojun branches: 1.1.2;
hifn7751 crypto card driver. from openbsd.
does nothing useful at this moment - initailize the chip, that's all.
TODO: crypto logic framework in kernel (see openbsd sys/crypto)
TODO: ipsec frontend (need major rework in ipsec tree - should start with busywait)
TODO: character device frontend
 1.1.2.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.2.1  12-Oct-2000  bouyer file hifn7751var.h was added on branch thorpej_scsipi on 2000-11-20 11:42:20 +0000
 1.2.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.2.2.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.2.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1  03-Aug-2004  skrll Sync with HEAD
 1.4.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.8.1  29-Apr-2005  kent sync with -current
 1.5.4.1  21-Jun-2006  yamt sync with head.
 1.7.110.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.110.2  30-Oct-2012  yamt sync with head
 1.7.110.1  17-Apr-2012  yamt sync with head
 1.8.8.4  03-Dec-2017  jdolecek update from HEAD
 1.8.8.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.8.2  23-Jun-2013  tls resync from head
 1.8.8.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.10.2.1  18-May-2014  rmind sync with head
 1.11.6.1  06-Jun-2015  skrll Sync with HEAD

RSS XML Feed