Home | History | Annotate | Download | only in gpib
History log of /src/sys/dev/gpib/rd.c
RevisionDateAuthorComments
 1.45  12-Feb-2023  andvar fix various typos in comments.
 1.44  31-Jul-2021  andvar s/threshhold/threshold
 1.43  29-Sep-2020  msaitoh branches: 1.43.6;
s/parition/partition/
 1.42  28-Oct-2017  riastradh Kill some more extern struct cfdriver declarations.

Down with externs in .c!
 1.41  11-Jul-2016  msaitoh KNF. No functional change.
 1.40  13-Apr-2015  riastradh Convert sys/dev to use <sys/rndsource.h>.
 1.39  02-Jan-2015  christos We have three sets of DTYPE_ constants in the kernel:
altq Drop Type
disklabel Disk Type
file Descriptor Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
 1.38  31-Dec-2014  christos fix typo
 1.37  31-Dec-2014  christos make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.
 1.36  10-Aug-2014  tls branches: 1.36.4;
Merge tls-earlyentropy branch into HEAD.
 1.35  25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.34  25-Jul-2014  dholland Add d_discard to all struct bdevsw instances I could find.

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
 1.33  23-Mar-2014  christos branches: 1.33.2;
remove unused
 1.32  16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.31  27-Oct-2012  chs branches: 1.31.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.30  02-Feb-2012  tls branches: 1.30.6;
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.29  19-Nov-2011  tls branches: 1.29.2;
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.28  08-Feb-2011  rmind branches: 1.28.4;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.27  12-Sep-2009  tsutsui branches: 1.27.4; 1.27.6; 1.27.8;
- fix warnings of printf(9) format and void pointer arithmetic
- use DTYPE_HPIB for now instead of nonexistent DTYPE_GPIB
 1.26  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.25  12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.24  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.23  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.22  13-Jan-2009  yamt branches: 1.22.2;
g/c BUFQ_FOO() macros and use bufq_foo() directly.
 1.21  11-Jun-2008  cegger branches: 1.21.4;
- use device_lookup_private to get softc
- ansify
 1.20  28-Apr-2008  martin branches: 1.20.2; 1.20.4;
Remove clause 3 and 4 from TNF licenses
 1.19  08-Apr-2008  cegger branches: 1.19.2; 1.19.4;
use aprint_*_dev and device_xname
 1.18  08-Oct-2007  ad branches: 1.18.18;
Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
 1.17  29-Jul-2007  ad branches: 1.17.4; 1.17.6; 1.17.8; 1.17.10;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.16  09-Jul-2007  ad branches: 1.16.2;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.15  04-Mar-2007  christos branches: 1.15.2; 1.15.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.14  13-Jan-2007  cube branches: 1.14.2;
Complete initializers, teach drivers that we moved from struct proc to
struct lwp, sprinkle some needed const qualifiers.
 1.13  14-May-2006  elad branches: 1.13.8;
integrate kauth.
 1.12  14-Apr-2006  blymn Make i/o statistics collection more generic, include tape drives and
nfs mounts in the set of devices that statistics will be reported on.
 1.11  29-Mar-2006  thorpej Use device_private().
 1.10  28-Mar-2006  thorpej Use device_unit().
 1.9  25-Mar-2006  thorpej Use device_parent().
 1.8  25-Feb-2006  wiz branches: 1.8.2; 1.8.4; 1.8.6;
Fix some typos.
 1.7  11-Dec-2005  christos branches: 1.7.2; 1.7.4; 1.7.6;
merge ktrace-lwp.
 1.6  15-Oct-2005  yamt - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
 1.5  27-Feb-2005  perry branches: 1.5.4;
nuke trailing whitespace
 1.4  28-Oct-2004  yamt branches: 1.4.4; 1.4.6;
move buffer queue related stuffs from buf.h to their own header, bufq.h.
 1.3  28-Aug-2004  thorpej Remove the last vestiges of COMPAT_NOLABEL. It's been 10 years; label
your disks already.
 1.2  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.1  02-Jun-2003  gmcgarry branches: 1.1.2;
Port hp300 driver for HPIB/GPIB disks to MI gpib framework.
 1.1.2.7  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.5  02-Nov-2004  skrll Sync with HEAD.
 1.1.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2  03-Sep-2004  skrll Sync with HEAD
 1.1.2.1  03-Aug-2004  skrll Sync with HEAD
 1.4.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.4.1  29-Apr-2005  kent sync with -current
 1.5.4.4  27-Oct-2007  yamt sync with head.
 1.5.4.3  03-Sep-2007  yamt sync with head.
 1.5.4.2  26-Feb-2007  yamt sync with head.
 1.5.4.1  21-Jun-2006  yamt sync with head.
 1.7.6.1  22-Apr-2006  simonb Sync with head.
 1.7.4.1  09-Sep-2006  rpaulo sync with head
 1.7.2.1  01-Mar-2006  yamt sync with head.
 1.8.6.3  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.8.6.2  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.8.6.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.8.4.1  19-Apr-2006  elad sync with head.
 1.8.2.2  24-May-2006  yamt sync with head.
 1.8.2.1  01-Apr-2006  yamt sync with head.
 1.13.8.1  01-Feb-2007  ad Sync with head.
 1.14.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.15.4.1  11-Jul-2007  mjf Sync with head.
 1.15.2.3  20-Aug-2007  ad - Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.
 1.15.2.2  19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.15.2.1  01-Jul-2007  ad Adapt to callout API change.
 1.16.2.1  15-Aug-2007  skrll Sync with HEAD.
 1.17.10.2  29-Jul-2007  ad It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.17.10.1  29-Jul-2007  ad file rd.c was added on branch matt-mips64 on 2007-07-29 12:15:44 +0000
 1.17.8.1  14-Oct-2007  yamt sync with head.
 1.17.6.1  06-Nov-2007  matt sync with HEAD
 1.17.4.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.18.18.3  17-Jan-2009  mjf Sync with HEAD.
 1.18.18.2  29-Jun-2008  mjf Sync with HEAD.
 1.18.18.1  02-Jun-2008  mjf Sync with HEAD.
 1.19.4.4  16-Sep-2009  yamt sync with head
 1.19.4.3  16-May-2009  yamt sync with head
 1.19.4.2  04-May-2009  yamt sync with head.
 1.19.4.1  16-May-2008  yamt sync with head.
 1.19.2.2  17-Jun-2008  yamt sync with head.
 1.19.2.1  18-May-2008  yamt sync with head.
 1.20.4.1  18-Jun-2008  simonb Sync with head.
 1.20.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.21.4.2  28-Apr-2009  skrll Sync with HEAD.
 1.21.4.1  19-Jan-2009  skrll Sync with HEAD.
 1.22.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.27.8.1  17-Feb-2011  bouyer Sync with HEAD
 1.27.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.27.4.1  05-Mar-2011  rmind sync with head
 1.28.4.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.28.4.2  30-Oct-2012  yamt sync with head
 1.28.4.1  17-Apr-2012  yamt sync with head
 1.29.2.1  18-Feb-2012  mrg merge to -current.
 1.30.6.4  03-Dec-2017  jdolecek update from HEAD
 1.30.6.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.30.6.2  02-Dec-2012  tls Don't pass NULL struct dkdriver to disk_init. That's seriously bogus.
 1.30.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.31.2.1  18-May-2014  rmind sync with head
 1.33.2.2  10-Aug-2014  tls Rebase.
 1.33.2.1  07-Apr-2014  tls Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
that had stubbed out code, other minor cleanups.
 1.36.4.3  05-Oct-2016  skrll Sync with HEAD
 1.36.4.2  06-Jun-2015  skrll Sync with HEAD
 1.36.4.1  06-Apr-2015  skrll Sync with HEAD
 1.43.6.1  01-Aug-2021  thorpej Sync with HEAD.

RSS XML Feed