head 1.10; access; symbols netbsd-11-0-RC4:1.10 netbsd-11-0-RC3:1.10 netbsd-11-0-RC2:1.10 netbsd-11-0-RC1:1.10 perseant-exfatfs-base-20250801:1.10 netbsd-11:1.10.0.4 netbsd-11-base:1.10 netbsd-10-1-RELEASE:1.9 perseant-exfatfs-base-20240630:1.10 perseant-exfatfs:1.10.0.2 perseant-exfatfs-base:1.10 netbsd-8-3-RELEASE:1.3 netbsd-9-4-RELEASE:1.5 netbsd-10-0-RELEASE:1.9 netbsd-10-0-RC6:1.9 netbsd-10-0-RC5:1.9 netbsd-10-0-RC4:1.9 netbsd-10-0-RC3:1.9 netbsd-10-0-RC2:1.9 thorpej-ifq:1.9.0.8 thorpej-ifq-base:1.9 thorpej-altq-separation:1.9.0.6 thorpej-altq-separation-base:1.9 netbsd-10-0-RC1:1.9 netbsd-10:1.9.0.4 netbsd-10-base:1.9 bouyer-sunxi-drm:1.9.0.2 bouyer-sunxi-drm-base:1.9 netbsd-9-3-RELEASE:1.5 thorpej-i2c-spi-conf2:1.7.0.6 thorpej-i2c-spi-conf2-base:1.7 thorpej-futex2:1.7.0.4 thorpej-futex2-base:1.7 thorpej-cfargs2:1.7.0.2 thorpej-cfargs2-base:1.7 cjep_sun2x-base1:1.6 cjep_sun2x:1.6.0.10 cjep_sun2x-base:1.6 cjep_staticlib_x-base1:1.6 netbsd-9-2-RELEASE:1.5 cjep_staticlib_x:1.6.0.8 cjep_staticlib_x-base:1.6 thorpej-i2c-spi-conf:1.6.0.6 thorpej-i2c-spi-conf-base:1.7 thorpej-cfargs:1.6.0.4 thorpej-cfargs-base:1.6 thorpej-futex:1.6.0.2 thorpej-futex-base:1.6 netbsd-9-1-RELEASE:1.5 bouyer-xenpvh-base2:1.5 phil-wifi-20200421:1.5 bouyer-xenpvh-base1:1.5 phil-wifi-20200411:1.5 bouyer-xenpvh:1.5.0.10 bouyer-xenpvh-base:1.5 is-mlppp:1.5.0.8 is-mlppp-base:1.5 phil-wifi-20200406:1.5 netbsd-8-2-RELEASE:1.3 ad-namecache-base3:1.5 netbsd-9-0-RELEASE:1.5 netbsd-9-0-RC2:1.5 ad-namecache-base2:1.5 ad-namecache-base1:1.5 ad-namecache:1.5.0.6 ad-namecache-base:1.5 netbsd-9-0-RC1:1.5 phil-wifi-20191119:1.5 netbsd-9:1.5.0.4 netbsd-9-base:1.5 phil-wifi-20190609:1.5 netbsd-8-1-RELEASE:1.3 netbsd-8-1-RC1:1.3 isaki-audio2:1.5.0.2 isaki-audio2-base:1.5 pgoyette-compat-merge-20190127:1.4.4.1 pgoyette-compat-20190127:1.5 pgoyette-compat-20190118:1.5 pgoyette-compat-1226:1.5 pgoyette-compat-1126:1.4 pgoyette-compat-1020:1.4 pgoyette-compat-0930:1.4 pgoyette-compat-0906:1.4 jdolecek-ncqfixes:1.4.0.8 jdolecek-ncqfixes-base:1.4 pgoyette-compat-0728:1.4 netbsd-8-0-RELEASE:1.3 phil-wifi:1.4.0.6 phil-wifi-base:1.4 pgoyette-compat-0625:1.4 netbsd-8-0-RC2:1.3 pgoyette-compat-0521:1.4 pgoyette-compat-0502:1.4 pgoyette-compat-0422:1.4 netbsd-8-0-RC1:1.3 pgoyette-compat-0415:1.4 pgoyette-compat-0407:1.4 pgoyette-compat-0330:1.4 pgoyette-compat-0322:1.4 pgoyette-compat-0315:1.4 pgoyette-compat:1.4.0.4 pgoyette-compat-base:1.4 tls-maxphys:1.4.0.2 tls-maxphys-base-20171202:1.4 matt-nb8-mediatek:1.3.0.10 matt-nb8-mediatek-base:1.3 nick-nhusb-base-20170825:1.3 perseant-stdc-iso10646:1.3.0.8 perseant-stdc-iso10646-base:1.3 netbsd-8:1.3.0.6 netbsd-8-base:1.3 prg-localcount2-base3:1.3 prg-localcount2-base2:1.3 prg-localcount2-base1:1.3 prg-localcount2:1.3.0.4 prg-localcount2-base:1.3 pgoyette-localcount-20170426:1.3 bouyer-socketcan-base1:1.3 jdolecek-ncq:1.3.0.2 jdolecek-ncq-base:1.3 pgoyette-localcount-20170320:1.3 nick-nhusb-base-20170204:1.2 bouyer-socketcan:1.2.0.2 bouyer-socketcan-base:1.2 pgoyette-localcount-20170107:1.2 nick-nhusb-base-20161204:1.1 pgoyette-localcount-20161104:1.1 nick-nhusb-base-20161004:1.1 localcount-20160914:1.1 pgoyette-localcount-20160806:1.1 pgoyette-localcount-20160726:1.1 pgoyette-localcount:1.1.0.4 pgoyette-localcount-base:1.1 nick-nhusb-base-20160907:1.1 nick-nhusb-base-20160529:1.1 nick-nhusb-base-20160422:1.1 nick-nhusb-base-20160319:1.1 nick-nhusb-base-20151226:1.1 nick-nhusb:1.1.0.2 nick-nhusb-base-20150921:1.1; locks; strict; comment @# @; 1.10 date 2024.04.02.22.30.03; author charlotte; state Exp; branches; next 1.9; commitid cKfhfl9PugUtvC4F; 1.9 date 2022.06.04.03.31.10; author pgoyette; state Exp; branches; next 1.8; commitid 1bEs5V0mEmyIHFGD; 1.8 date 2021.10.10.13.03.09; author jmcneill; state Exp; branches; next 1.7; commitid Tn9O3sAAmUaZsgcD; 1.7 date 2021.07.21.23.16.09; author jmcneill; state Exp; branches; next 1.6; commitid kEmQRQsKCzPpuU1D; 1.6 date 2020.04.30.03.28.18; author riastradh; state Exp; branches 1.6.6.1; next 1.5; commitid cPJImU3MZz0Vhm6C; 1.5 date 2018.12.25.11.56.13; author mlelstv; state Exp; branches; next 1.4; commitid B7hyyTWT0huqUa5B; 1.4 date 2017.11.01.19.34.45; author mlelstv; state Exp; branches 1.4.2.1 1.4.4.1 1.4.6.1; next 1.3; commitid SU6dFmlIdrLWUmdA; 1.3 date 2017.02.26.11.56.49; author rin; state Exp; branches; next 1.2; commitid HTfuz8qVgdmHlsHz; 1.2 date 2016.12.10.10.26.38; author mlelstv; state Exp; branches 1.2.2.1; next 1.1; commitid K0Z23a4Rqq2Dmqxz; 1.1 date 2015.08.21.02.18.18; author uebayasi; state Exp; branches 1.1.2.1 1.1.4.1; next ; commitid a4Ly0sF1vclNZ4yy; 1.6.6.1 date 2021.08.01.22.42.20; author thorpej; state Exp; branches; next ; commitid NihqK3haIgTUWj3D; 1.4.2.1 date 2017.11.01.19.34.45; author jdolecek; state dead; branches; next 1.4.2.2; commitid XcIYRZTAh1LmerhA; 1.4.2.2 date 2017.12.03.11.36.58; author jdolecek; state Exp; branches; next ; commitid XcIYRZTAh1LmerhA; 1.4.4.1 date 2018.12.26.14.01.47; author pgoyette; state Exp; branches; next ; commitid xUhK8IAeBM1azj5B; 1.4.6.1 date 2019.06.10.22.07.04; author christos; state Exp; branches; next ; commitid jtc8rnCzWiEEHGqB; 1.2.2.1 date 2017.04.21.16.53.44; author bouyer; state Exp; branches; next ; commitid dUG7nkTKALCadqOz; 1.1.2.1 date 2015.08.21.02.18.18; author skrll; state dead; branches; next 1.1.2.2; commitid CpNWKp3ozVNTafCy; 1.1.2.2 date 2015.09.22.12.05.56; author skrll; state Exp; branches; next 1.1.2.3; commitid CpNWKp3ozVNTafCy; 1.1.2.3 date 2017.02.05.13.40.26; author skrll; state Exp; branches; next 1.1.2.4; commitid 8hwpk1aHl2UuyLEz; 1.1.2.4 date 2017.08.28.17.52.00; author skrll; state Exp; branches; next ; commitid UQQpnjvcNkUZn05A; 1.1.4.1 date 2017.01.07.08.56.31; author pgoyette; state Exp; branches; next 1.1.4.2; commitid uEL0C1YuiJrlV0Bz; 1.1.4.2 date 2017.03.20.06.57.27; author pgoyette; state Exp; branches; next ; commitid jjw7cAwgyKq7RfKz; desc @@ 1.10 log @dk(4): Add support for discovering Atari TOS partitions as wedges Any partitioning scheme which conforms to the Atari AHDI 3.00 spec should be recognized by the new DKWEDGE_METHOD_TOS. @ text @# $NetBSD: files.dev,v 1.9 2022/06/04 03:31:10 pgoyette Exp $ file dev/bio.c bio needs-flag file dev/ccd.c ccd file dev/cgd.c cgd file dev/cgd_crypto.c cgd file dev/clock_subr.c kern # XXX file dev/clockctl.c clockctl file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld | sd | cd | wd file dev/dkwedge/dk.c kern # XXX file dev/dkwedge/dkwedge_apple.c dkwedge_method_apple file dev/dkwedge/dkwedge_bsdlabel.c dkwedge_method_bsdlabel file dev/dkwedge/dkwedge_gpt.c dkwedge_method_gpt file dev/dkwedge/dkwedge_mbr.c dkwedge_method_mbr file dev/dkwedge/dkwedge_rdb.c dkwedge_method_rdb file dev/dkwedge/dkwedge_tos.c dkwedge_method_tos file dev/firmload.c firmload file dev/fss.c fss file dev/keylock.c keylock file dev/lockstat.c lockstat needs-flag file dev/md.c md file dev/mm.c kern # XXX file dev/nullcons_subr.c nullcons needs-flag file dev/radio.c radio needs-flag file dev/random.c rnd needs-flag file dev/video.c video needs-flag file dev/vnd.c vnd file dev/ipmi.c ipmi needs-flag file dev/smbios.c smbios defpseudo efi file dev/efi.c efi needs-flag @ 1.9 log @Combine the midi and sequencer modules into a single midi_seq module to avoid a circular dependency as noted in kern/56772. Retain minimal modules of the original names to accomodate auto-loading upon access to the /dev/xxx nodes. @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.8 2021/10/10 13:03:09 jmcneill Exp $ d16 1 @ 1.8 log @efi: Add /dev/efi character device Introduce a /dev/efi character device that provides a means for accessing UEFI RT variable services from userland. Compatible with the FreeBSD ioctl interface for ease of porting their libefivar and associated tools. The ioctl interface is defined in sys/efiio.h. To enable support for this on an arch, the kernel needs `pseudo-device efi` and the MD EFI implementation needs to register its backend by calling efi_ops_register(). This commit includes an implementation for Arm. @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.7 2021/07/21 23:16:09 jmcneill Exp $ a24 1 file dev/sequencer.c sequencer needs-flag @ 1.7 log @Separate MI smbios interface from MD specific code. @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.6 2020/04/30 03:28:18 riastradh Exp $ d30 3 @ 1.6 log @Rewrite entropy subsystem. Primary goals: 1. Use cryptography primitives designed and vetted by cryptographers. 2. Be honest about entropy estimation. 3. Propagate full entropy as soon as possible. 4. Simplify the APIs. 5. Reduce overhead of rnd_add_data and cprng_strong. 6. Reduce side channels of HWRNG data and human input sources. 7. Improve visibility of operation with sysctl and event counters. Caveat: rngtest is no longer used generically for RND_TYPE_RNG rndsources. Hardware RNG devices should have hardware-specific health tests. For example, checking for two repeated 256-bit outputs works to detect AMD's 2019 RDRAND bug. Not all hardware RNGs are necessarily designed to produce exactly uniform output. ENTROPY POOL - A Keccak sponge, with test vectors, replaces the old LFSR/SHA-1 kludge as the cryptographic primitive. - `Entropy depletion' is available for testing purposes with a sysctl knob kern.entropy.depletion; otherwise it is disabled, and once the system reaches full entropy it is assumed to stay there as far as modern cryptography is concerned. - No `entropy estimation' based on sample values. Such `entropy estimation' is a contradiction in terms, dishonest to users, and a potential source of side channels. It is the responsibility of the driver author to study the entropy of the process that generates the samples. - Per-CPU gathering pools avoid contention on a global queue. - Entropy is occasionally consolidated into global pool -- as soon as it's ready, if we've never reached full entropy, and with a rate limit afterward. Operators can force consolidation now by running sysctl -w kern.entropy.consolidate=1. - rndsink(9) API has been replaced by an epoch counter which changes whenever entropy is consolidated into the global pool. . Usage: Cache entropy_epoch() when you seed. If entropy_epoch() has changed when you're about to use whatever you seeded, reseed. . Epoch is never zero, so initialize cache to 0 if you want to reseed on first use. . Epoch is -1 iff we have never reached full entropy -- in other words, the old rnd_initial_entropy is (entropy_epoch() != -1) -- but it is better if you check for changes rather than for -1, so that if the system estimated its own entropy incorrectly, entropy consolidation has the opportunity to prevent future compromise. - Sysctls and event counters provide operator visibility into what's happening: . kern.entropy.needed - bits of entropy short of full entropy . kern.entropy.pending - bits known to be pending in per-CPU pools, can be consolidated with sysctl -w kern.entropy.consolidate=1 . kern.entropy.epoch - number of times consolidation has happened, never 0, and -1 iff we have never reached full entropy CPRNG_STRONG - A cprng_strong instance is now a collection of per-CPU NIST Hash_DRBGs. There are only two in the system: user_cprng for /dev/urandom and sysctl kern.?random, and kern_cprng for kernel users which may need to operate in interrupt context up to IPL_VM. (Calling cprng_strong in interrupt context does not strike me as a particularly good idea, so I added an event counter to see whether anything actually does.) - Event counters provide operator visibility into when reseeding happens. INTEL RDRAND/RDSEED, VIA C3 RNG (CPU_RNG) - Unwired for now; will be rewired in a subsequent commit. @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.5 2018/12/25 11:56:13 mlelstv Exp $ d29 1 @ 1.6.6.1 log @Sync with HEAD. @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.7 2021/07/21 23:16:09 jmcneill Exp $ a28 1 file dev/smbios.c smbios @ 1.5 log @Make ipmi driver available to other platforms. Add ACPI attachment. @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.4 2017/11/01 19:34:45 mlelstv Exp $ d24 1 a24 1 file dev/rndpseudo.c rnd needs-flag @ 1.4 log @refactor wd and ataraid drivers to use common disk subroutines. @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.3 2017/02/26 11:56:49 rin Exp $ d28 1 @ 1.4.6.1 log @Sync with HEAD @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.5 2018/12/25 11:56:13 mlelstv Exp $ a27 1 file dev/ipmi.c ipmi needs-flag @ 1.4.4.1 log @Sync with HEAD, resolve a few conflicts @ text @d1 1 a1 1 # $NetBSD$ a27 1 file dev/ipmi.c ipmi needs-flag @ 1.4.2.1 log @file files.dev was added on branch tls-maxphys on 2017-12-03 11:36:58 +0000 @ text @d1 27 @ 1.4.2.2 log @update from HEAD @ text @a0 27 # $NetBSD$ file dev/bio.c bio needs-flag file dev/ccd.c ccd file dev/cgd.c cgd file dev/cgd_crypto.c cgd file dev/clock_subr.c kern # XXX file dev/clockctl.c clockctl file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld | sd | cd | wd file dev/dkwedge/dk.c kern # XXX file dev/dkwedge/dkwedge_apple.c dkwedge_method_apple file dev/dkwedge/dkwedge_bsdlabel.c dkwedge_method_bsdlabel file dev/dkwedge/dkwedge_gpt.c dkwedge_method_gpt file dev/dkwedge/dkwedge_mbr.c dkwedge_method_mbr file dev/dkwedge/dkwedge_rdb.c dkwedge_method_rdb file dev/firmload.c firmload file dev/fss.c fss file dev/keylock.c keylock file dev/lockstat.c lockstat needs-flag file dev/md.c md file dev/mm.c kern # XXX file dev/nullcons_subr.c nullcons needs-flag file dev/radio.c radio needs-flag file dev/rndpseudo.c rnd needs-flag file dev/sequencer.c sequencer needs-flag file dev/video.c video needs-flag file dev/vnd.c vnd @ 1.3 log @Add DKWEDGE_METHOD_RDB option, which is Amiga Rigid Disk Block (RDB) partitioning detection method for dk(4). @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.2 2016/12/10 10:26:38 mlelstv Exp $ d9 1 a9 1 file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld | sd | cd @ 1.2 log @Refactored sd and cd to use common disk subroutines. @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.1 2015/08/21 02:18:18 uebayasi Exp $ d15 1 @ 1.2.2.1 log @Sync with HEAD @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.3 2017/02/26 11:56:49 rin Exp $ a14 1 file dev/dkwedge/dkwedge_rdb.c dkwedge_method_rdb @ 1.1 log @Move dev/ definitions out of files.kern. @ text @d1 1 a1 1 # $NetBSD$ d9 1 a9 1 file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld @ 1.1.4.1 log @Sync with HEAD. (Note that most of these changes are simply $NetBSD$ tag issues.) @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.2 2016/12/10 10:26:38 mlelstv Exp $ d9 1 a9 1 file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld | sd | cd @ 1.1.4.2 log @Sync with HEAD @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.3 2017/02/26 11:56:49 rin Exp $ a14 1 file dev/dkwedge/dkwedge_rdb.c dkwedge_method_rdb @ 1.1.2.1 log @file files.dev was added on branch nick-nhusb on 2015-09-22 12:05:56 +0000 @ text @d1 26 @ 1.1.2.2 log @Sync with HEAD @ text @a0 26 # $NetBSD: files.dev,v 1.1 2015/08/21 02:18:18 uebayasi Exp $ file dev/bio.c bio needs-flag file dev/ccd.c ccd file dev/cgd.c cgd file dev/cgd_crypto.c cgd file dev/clock_subr.c kern # XXX file dev/clockctl.c clockctl file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld file dev/dkwedge/dk.c kern # XXX file dev/dkwedge/dkwedge_apple.c dkwedge_method_apple file dev/dkwedge/dkwedge_bsdlabel.c dkwedge_method_bsdlabel file dev/dkwedge/dkwedge_gpt.c dkwedge_method_gpt file dev/dkwedge/dkwedge_mbr.c dkwedge_method_mbr file dev/firmload.c firmload file dev/fss.c fss file dev/keylock.c keylock file dev/lockstat.c lockstat needs-flag file dev/md.c md file dev/mm.c kern # XXX file dev/nullcons_subr.c nullcons needs-flag file dev/radio.c radio needs-flag file dev/rndpseudo.c rnd needs-flag file dev/sequencer.c sequencer needs-flag file dev/video.c video needs-flag file dev/vnd.c vnd @ 1.1.2.3 log @Sync with HEAD @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.1.2.2 2015/09/22 12:05:56 skrll Exp $ d9 1 a9 1 file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld | sd | cd @ 1.1.2.4 log @Sync with HEAD @ text @d1 1 a1 1 # $NetBSD: files.dev,v 1.1.2.3 2017/02/05 13:40:26 skrll Exp $ a14 1 file dev/dkwedge/dkwedge_rdb.c dkwedge_method_rdb @