CVS commit: src/sys/miscfs/procfs
Module Name:src Committed By: riastradh Date: Wed Apr 29 07:18:24 UTC 2020 Modified Files: src/sys/miscfs/procfs: procfs.h Log Message: Put forward declaration a little further forward to unbreak build. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/miscfs/procfs/procfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/hdaudio
Module Name:src Committed By: nia Date: Wed Apr 29 07:24:53 UTC 2020 Modified Files: src/sys/dev/hdaudio: hdaudiodevs Log Message: hdaudiodevs: Add Realtek ALC292 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/hdaudio/hdaudiodevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/hdaudio
Module Name:src Committed By: nia Date: Wed Apr 29 07:36:22 UTC 2020 Modified Files: src/sys/dev/hdaudio: hdaudiodevs.h hdaudiodevs_data.h Log Message: hdaudiodevs: regen To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/hdaudio/hdaudiodevs.h \ src/sys/dev/hdaudio/hdaudiodevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nia Date: Wed Apr 29 08:05:10 UTC 2020 Modified Files: src/sys/dev/usb: usbdevs Log Message: usbdevs: more Intel Integrated Rate Matching Hub IDs To generate a diff of this commit: cvs rdiff -u -r1.781 -r1.782 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nia Date: Wed Apr 29 08:06:03 UTC 2020 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: usbdevs: regen To generate a diff of this commit: cvs rdiff -u -r1.771 -r1.772 src/sys/dev/usb/usbdevs.h \ src/sys/dev/usb/usbdevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/mount_qemufwcfg
Module Name:src Committed By: gson Date: Wed Apr 29 09:54:43 UTC 2020 Modified Files: src/sbin/mount_qemufwcfg: mount_qemufwcfg.8 Log Message: Remove references to "special", as mount_qemufwcfg(8) does not actually take such an argument. Discussed with jmcneill. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sbin/mount_qemufwcfg/mount_qemufwcfg.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gdb/lib/libgdb
Module Name:src Committed By: rin Date: Wed Apr 29 11:04:58 UTC 2020 Modified Files: src/external/gpl3/gdb/lib/libgdb: Makefile Log Message: PR toolchain/54820 PR toolchain/54877 GCC 8.4 miscompiles dwarf2expr.c with -O2 or -O1 for earmv7hf{,eb}, which results in crashes described in the PRs. No upstream fixes up to now. So, let us disable optimization for this file. Note that this affects only earmv7hf{,eb} as far as I can see. Crashes do not occur neither for earmv6hf{,eb} nor earmv7{,eb}. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gdb/lib/libgdb/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: rin Date: Wed Apr 29 11:08:40 UTC 2020 Modified Files: src/doc: HACKS Log Message: PR toolchain/54820 PR toolchain/54877 earmv7hf{,eb}: compile gdb/dwarf2expr.c with -O0 for GCC8 http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gdb/lib/libgdb/Makefile#rev1.22 To generate a diff of this commit: cvs rdiff -u -r1.201 -r1.202 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pckbport
Module Name:src Committed By: martin Date: Wed Apr 29 13:25:42 UTC 2020 Modified Files: src/sys/dev/pckbport [netbsd-9]: synaptics.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #865): sys/dev/pckbport/synaptics.c: revision 1.66 pms_synaptics_enable: no need to send PMS_DEV_ENABLE here because pms_enable does this for us. Seems to resolve issues with my trackpoint not working immediately after starting X on ThinkPad X260. To generate a diff of this commit: cvs rdiff -u -r1.50.2.4 -r1.50.2.5 src/sys/dev/pckbport/synaptics.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/acpi
Module Name:src Committed By: martin Date: Wed Apr 29 13:33:36 UTC 2020 Modified Files: src/sys/dev/acpi [netbsd-9]: acpi_ec.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #866): sys/dev/acpi/acpi_ec.c: revision 1.82 kern/55206: acpibat reporting broken by acpi_ec.c r1.81 Assume byte instead of qword alignment of the buffer passed to the EC space handler. To generate a diff of this commit: cvs rdiff -u -r1.75.20.2 -r1.75.20.3 src/sys/dev/acpi/acpi_ec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/acpi
Module Name:src Committed By: martin Date: Wed Apr 29 13:36:57 UTC 2020 Modified Files: src/sys/dev/acpi [netbsd-9]: acpi_display.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #867): sys/dev/acpi/acpi_display.c: revision 1.17 Demote "unknown output device" message from error to debug, and change the wording to reflect what is really happening -- the display output is not connected. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.16.16.1 src/sys/dev/acpi/acpi_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/arch
Module Name:src Committed By: martin Date: Wed Apr 29 13:39:23 UTC 2020 Modified Files: src/sys/arch/amd64/amd64 [netbsd-9]: machdep.c src/sys/arch/x86/x86 [netbsd-9]: pmap.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #868): sys/arch/x86/x86/pmap.c: revision 1.384 sys/arch/amd64/amd64/machdep.c: revision 1.349 Detect PAT on the boot processor before cpu0 attaches so the early genfb attach code can map the framebuffer with write combining. To generate a diff of this commit: cvs rdiff -u -r1.335 -r1.335.2.1 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.334 -r1.334.2.1 src/sys/arch/x86/x86/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Wed Apr 29 13:42:21 UTC 2020 Modified Files: src/sys/dev/hdaudio [netbsd-9]: hdaudiodevs Log Message: Pull up following revision(s) (requested by jmcneill in ticket #869): sys/dev/hdaudio/hdaudiodevs: revision 1.4 Add Realtek ALC293 To generate a diff of this commit: cvs rdiff -u -r1.2.26.1 -r1.2.26.2 src/sys/dev/hdaudio/hdaudiodevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Wed Apr 29 13:43:42 UTC 2020 Modified Files: src/sys/dev/hdaudio [netbsd-9]: hdaudiodevs.h hdaudiodevs_data.h Log Message: Regen for ticket #869 To generate a diff of this commit: cvs rdiff -u -r1.2.26.1 -r1.2.26.2 src/sys/dev/hdaudio/hdaudiodevs.h \ src/sys/dev/hdaudio/hdaudiodevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: martin Date: Wed Apr 29 13:45:38 UTC 2020 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs [netbsd-9]: vdev_disk.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #870): external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c: revision 1.16 Set up more of a fake struct buf, for ldminphys. Fixes: arm64# zpool create rpool ld4 [ 198.4376097] panic: Trap: Data Abort (EL1): Translation Fault L1 with read access for 0178: pc c017acf4: opcode f940bc00: ldr x0, [x0,#376] [ 198.4694793] fp c00073026660 ldminphys() at c017acf4 netbsd:ldminphys+0x34 [ 198.4792624] fp c00073026680 vdev_disk_open.part.4() at c13d4c4c zfs:vdev_disk_open.part.4+0x37c [ 198.4792624] fp c000730268d0 vdev_open() at c13d2530 zfs:vdev_open+0x68 [ 198.4792624] fp c00073026920 vdev_open_children() at c13d2958 zfs:vdev_open_children+0x40 [ 198.4792624] fp c00073026950 vdev_root_open() at c13dad48 zfs:vdev_root_open+0x30 XXX pullup-9 To generate a diff of this commit: cvs rdiff -u -r1.11.2.3 -r1.11.2.4 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src
Module Name:src Committed By: martin Date: Wed Apr 29 13:47:52 UTC 2020 Modified Files: src/external/cddl/osnet/sys/sys [netbsd-9]: cred.h src/sys/sys [netbsd-9]: kauth.h Log Message: Pull up following revision(s) (requested by riastradh in ticket #871): external/cddl/osnet/sys/sys/cred.h: revision 1.7 sys/sys/kauth.h: revision 1.84 Fix crgetgroups shim. - Don't use a static buffer for the result. - kauth_cred_getgroups refuses to return more than the actual number of groups, so passing NGROUPS_MAX generally doesn't work. To avoid patching zfs, just expose struct kauth_cred::cr_groups directly, with __KAUTH_PRIVATE. Unclear why the official API only exposes it via memcpy or copyout anyway. This makes unprivileged zfs operations work, by anyone with access to /dev/zfs (which is conventionally mode 777, and which we should maybe set it to by default; zfs has its own ACL system, zfs allow). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.2.1 src/external/cddl/osnet/sys/sys/cred.h cvs rdiff -u -r1.82 -r1.82.4.1 src/sys/sys/kauth.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Wed Apr 29 13:51:09 UTC 2020 Modified Files: src/sys/dev/hdaudio [netbsd-9]: hdaudiodevs.h hdaudiodevs_data.h Log Message: Regen for ticket #872 To generate a diff of this commit: cvs rdiff -u -r1.2.26.2 -r1.2.26.3 src/sys/dev/hdaudio/hdaudiodevs.h \ src/sys/dev/hdaudio/hdaudiodevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Wed Apr 29 13:50:38 UTC 2020 Modified Files: src/sys/dev/hdaudio [netbsd-9]: hdaudiodevs Log Message: Pull up following revision(s) (requested by nia in ticket #872): sys/dev/hdaudio/hdaudiodevs: revision 1.5 hdaudiodevs: Add Realtek ALC292 To generate a diff of this commit: cvs rdiff -u -r1.2.26.2 -r1.2.26.3 src/sys/dev/hdaudio/hdaudiodevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Apr 29 13:53:51 UTC 2020 Modified Files: src/sys/dev/usb [netbsd-9]: usbdevs Log Message: Pull up following revision(s) (requested by nia in ticket #873): sys/dev/usb/usbdevs: revision 1.782 usbdevs: more Intel Integrated Rate Matching Hub IDs To generate a diff of this commit: cvs rdiff -u -r1.770.4.5 -r1.770.4.6 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Wed Apr 29 13:54:49 UTC 2020 Modified Files: src/sys/dev/usb [netbsd-9]: usbdevs.h usbdevs_data.h Log Message: Regen for ticket #873 To generate a diff of this commit: cvs rdiff -u -r1.760.4.5 -r1.760.4.6 src/sys/dev/usb/usbdevs.h \ src/sys/dev/usb/usbdevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Wed Apr 29 13:56:12 UTC 2020 Modified Files: src/doc [netbsd-9]: CHANGES-9.1 Log Message: Tickets #865 - #873 To generate a diff of this commit: cvs rdiff -u -r1.1.2.46 -r1.1.2.47 src/doc/CHANGES-9.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jakllsch Date: Wed Apr 29 18:52:03 UTC 2020 Modified Files: src/sys/dev/pci: if_msk.c if_mskvar.h Log Message: msk(4): don't keep array of pointers to each ring descriptor With 512 descriptors each in 2 rings this saves 4KiB (LP32) or 8KiB (LP64) per interface. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/dev/pci/if_msk.c cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/if_mskvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jakllsch Date: Wed Apr 29 20:03:52 UTC 2020 Modified Files: src/sys/dev/pci: if_msk.c if_mskvar.h Log Message: msk(4): Simply keep a ring of (tx) dmamaps, rather than a linked list To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/dev/pci/if_msk.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/if_mskvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/fortune/strfile
Module Name:src Committed By: nia Date: Wed Apr 29 20:45:05 UTC 2020 Modified Files: src/games/fortune/strfile: strfile.c Log Message: strfile: Check that input/output filenames don't exceed the buffer size To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/games/fortune/strfile/strfile.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/games/fortune/unstr
Module Name:src Committed By: nia Date: Wed Apr 29 21:00:42 UTC 2020 Modified Files: src/games/fortune/unstr: unstr.c Log Message: unstr: Check that the input filename fits in the buffer. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/games/fortune/unstr/unstr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: ad Date: Wed Apr 29 22:03:10 UTC 2020 Modified Files: src/sys/arch/x86/x86: cpu.c Log Message: Back out HPET delay & TSC changes to rule them out as the cause for recent hangs during boot etc. To generate a diff of this commit: cvs rdiff -u -r1.187 -r1.188 src/sys/arch/x86/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: rtr Date: Wed Apr 29 22:17:38 UTC 2020 Modified Files: src/share/misc: acronyms.comp Log Message: LSO large send offload To generate a diff of this commit: cvs rdiff -u -r1.301 -r1.302 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Wed Apr 29 23:15:22 UTC 2020 Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: cond-late.exp cond-late.mk Log Message: usr.bin/make: add test case for lazy conditions To generate a diff of this commit: cvs rdiff -u -r1.837 -r1.838 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.54 -r1.55 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/cond-late.exp \ src/usr.bin/make/unit-tests/cond-late.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: sevan Date: Thu Apr 30 00:32:16 UTC 2020 Modified Files: src/sys/dev/pci: if_rge.c Log Message: Sync with r1.3 from OpenBSD "Use correct bit mask to promptly exit rge_set_phy_power() and rge_exit_oob() timeout loops. Spotted by CID 1491296 and 1491309." To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/if_rge.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/modules/examples
Module Name:src Committed By: christos Date: Thu Apr 30 00:48:10 UTC 2020 Modified Files: src/sys/modules/examples: Makefile README src/sys/modules/examples/ping: ping.c Added Files: src/sys/modules/examples/pollpal: Makefile cmd_pollpal.c pollpal.c Log Message: New kernel example module written by Ayushi Sharma To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/modules/examples/Makefile cvs rdiff -u -r1.14 -r1.15 src/sys/modules/examples/README cvs rdiff -u -r1.3 -r1.4 src/sys/modules/examples/ping/ping.c cvs rdiff -u -r0 -r1.1 src/sys/modules/examples/pollpal/Makefile \ src/sys/modules/examples/pollpal/cmd_pollpal.c \ src/sys/modules/examples/pollpal/pollpal.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jakllsch Date: Thu Apr 30 01:52:09 UTC 2020 Modified Files: src/sys/dev/pci: if_msk.c Log Message: msk(4): rework rx descriptor loading to support multiple segments This paves the way to replace the driver-internal jumbo frame rx buffer with other recieve buffers (for example MCLGET/MEXTMALLOC) in the future. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/dev/pci/if_msk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/rndctl
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:24:48 UTC 2020 Modified Files: src/sbin/rndctl: rndctl.c Log Message: Accept both byte orders for random seed in `rndctl -L'. The file format was defined with a machine-dependent 32-bit integer field (the estimated number of bits of entropy in the process that generated it). Take whichever byte order gives a number that is reasonable, i.e. lower than the number of bits in the buffer. Continue to have `rndctl -S' generate it in machine-dependent byte order for now, so that if you roll back to an older rndctl(8) then `rndctl -L' on the same machine will still be able to load it with the right entropy estimate. In a future revision, perhaps we can change it to be little-endian. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sbin/rndctl/rndctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:24:28 UTC 2020 Modified Files: src/sys/dev/usb: ualea.c Log Message: Turn XXX comment into KASSERT. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/usb/ualea.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:24:15 UTC 2020 Modified Files: src/sys/dev/pci: amdpm.c hifn7751.c ubsec.c Log Message: Don't attach rndsource until it's actually ready to run. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/amdpm.c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/hifn7751.c cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/ubsec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/rndctl
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:27:15 UTC 2020 Modified Files: src/sbin/rndctl: rndctl.c Log Message: Sort includes. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sbin/rndctl/rndctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:28:19 UTC 2020 Modified Files: src/common/lib/libc: Makefile.inc src/distrib/sets/lists/comp: mi src/share/man/man4: rnd.4 src/share/man/man9: Makefile rnd.9 src/sys/dev: files.dev src/sys/kern: files.kern init_main.c subr_autoconf.c subr_cprng.c subr_prf.c src/sys/lib/libkern: Makefile.libkern src/sys/rump/dev/lib/librnd: Makefile rnd_component.c src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c rump.c src/sys/sys: cprng.h rndpool.h rndsource.h Added Files: src/sys/dev: random.c src/sys/kern: kern_entropy.c src/sys/lib/libkern: entpool.c entpool.h src/sys/sys: entropy.h Removed Files: src/share/man/man9: rndsink.9 src/sys/arch/amd64/conf: RNDVERBOSE src/sys/dev: rnd_private.h rndpseudo.c src/sys/kern: kern_rndpool.c kern_rndq.c kern_rndsink.c src/sys/sys: rndsink.h Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/common/lib/libc/Makefile.inc cvs rdiff -u -r1.2322 -r1.2323 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.28 -r1.29 src/share/man/man4/rnd.4 cvs rdiff -u -r1.448 -r1.449 src/share/man/man9/Makefile cvs rdiff -u -r1.27 -r1.28 src/share/man/man9/rnd.9 cvs rdiff -u -r1.2 -r0 src/share/man/man9/rndsink.9 cvs rdiff -u -r1.2 -r0 src/sys/arch/amd64/conf/RNDVERBOSE cvs rdiff -u -r1.5 -r1.6 src/sys/dev/files.dev cvs rdiff -u -r0 -r1.1 src/sys/dev/random.c cvs rdiff -u -r1.11
CVS commit: src/sys/arch
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:29:20 UTC 2020 Modified Files: src/sys/arch/amd64/amd64: machdep.c src/sys/arch/i386/i386: machdep.c src/sys/arch/x86/include: cpu_rng.h src/sys/arch/x86/x86: cpu_rng.c pmap.c Log Message: Simplify Intel RDRAND/RDSEED and VIA C3 RNG API. Push it all into MD x86 code to keep it simpler, until we have other examples on other CPUs. Simplify RDSEED-to-RDRAND fallback. Eliminate cpu_earlyrng in favour of just using entropy_extract, which is available early now. To generate a diff of this commit: cvs rdiff -u -r1.349 -r1.350 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.827 -r1.828 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x86/include/cpu_rng.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x86/x86/cpu_rng.c cvs rdiff -u -r1.384 -r1.385 src/sys/arch/x86/x86/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:30:11 UTC 2020 Modified Files: src/sys/arch/x86/x86: cpu_rng.c src/sys/compat/common: rndpseudo_50.c src/sys/compat/netbsd32: netbsd32_compat_50.c netbsd32_rndpseudo_50.c src/sys/netinet: sctp_pcb.c Log Message: Omit needless #include . To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/x86/cpu_rng.c cvs rdiff -u -r1.6 -r1.7 src/sys/compat/common/rndpseudo_50.c cvs rdiff -u -r1.48 -r1.49 src/sys/compat/netbsd32/netbsd32_compat_50.c cvs rdiff -u -r1.4 -r1.5 src/sys/compat/netbsd32/netbsd32_rndpseudo_50.c cvs rdiff -u -r1.20 -r1.21 src/sys/netinet/sctp_pcb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/crypto/cprng_fast
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:29:35 UTC 2020 Modified Files: src/sys/crypto/cprng_fast: cprng_fast.c Log Message: Adapt cprng_fast to use entropy_epoch(), not rnd_initial_entropy. This way it has an opportunity to be reseeded after boot. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/crypto/cprng_fast/cprng_fast.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:29:55 UTC 2020 Modified Files: src/sys/net: if_ethersubr.c Log Message: Convert ether_input from rnd_initial_entropy to entropy_epoch(). To generate a diff of this commit: cvs rdiff -u -r1.283 -r1.284 src/sys/net/if_ethersubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/crypto/cprng_fast
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:29:45 UTC 2020 Modified Files: src/sys/crypto/cprng_fast: cprng_fast.c Log Message: Count cprng_fast reseed events. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/crypto/cprng_fast/cprng_fast.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:40:54 UTC 2020 Modified Files: src/sys/arch/arm/amlogic: meson_rng.c src/sys/arch/arm/broadcom: bcm2835_rng.c src/sys/arch/arm/nvidia: tegra124_car.c tegra210_car.c src/sys/arch/arm/omap: am335x_trng.c src/sys/arch/arm/sunxi: sun8i_crypto.c src/sys/arch/arm/ti: ti_rng.c src/sys/arch/mips/ingenic: ingenic_rng.c src/sys/arch/x86/x86: cpu_rng.c src/sys/dev/ic: amdccp.c rng200.c src/sys/dev/pci: amdpm.c hifn7751.c ubsec.c viornd.c src/sys/dev/usb: ualea.c src/sys/rump/librump/rumpkern: hyperentropy.c Removed Files: src/sys/sys: rndpool.h Log Message: rnd_attach_source calls the callback itself now. No need for every driver to explicitly call it to prime the pool. Eliminate now-unused . To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/amlogic/meson_rng.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/broadcom/bcm2835_rng.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/nvidia/tegra124_car.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/nvidia/tegra210_car.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/omap/am335x_trng.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sunxi/sun8i_crypto.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/ti/ti_rng.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/ingenic/ingenic_rng.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/x86/cpu_rng.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/amdccp.c src/sys/dev/ic/rng200.c cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/amdpm.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/hifn7751.c cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/ubsec.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/viornd.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/usb/ualea.c cvs rdiff -u -r1.15 -r1.16 src/sys/rump/librump/rumpkern/hyperentropy.c cvs rdiff -u -r1.4 -r0 src/sys/sys/rndpool.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:41:31 UTC 2020 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Revert "- rnd_add_*() call must be serialized. Unserialized accesses broke the" It is no longer necessary to serialize calls to rnd_add_data, so we can use the same rndsource for every queue. This also reverts some unrelated changes that were mixed in: 1. WM_NRXDESC was made unsigned 2. The specific samples were changed. (1) will be redone in a separate commit. (2) was buggy (wrote `=' where `|=' was meant) and is not needed; it's fine to do rnd_add_data in a thread or softint too, not just in a hard interrupt handler. To generate a diff of this commit: cvs rdiff -u -r1.674 -r1.675 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:41:20 UTC 2020 Modified Files: src/sys/rump/librump/rumpkern: hyperentropy.c Log Message: No need for a lock around rnd_add_data any more. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/rump/librump/rumpkern/hyperentropy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:42:11 UTC 2020 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Make WM_NRXDESC unsigned. To generate a diff of this commit: cvs rdiff -u -r1.675 -r1.676 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Apr 30 03:42:23 UTC 2020 Modified Files: src/sys/kern: kern_entropy.c Log Message: Accept both byte orders for random seed in the kernel. The file format was defined with a machine-dependent 32-bit integer field (the estimated number of bits of entropy in the process that generated it). Fortunately we have a checksum to verify the order. This way you can use `rndctl -S' on a little-endian machine to generate a seed when installing NetBSD on a big-endian machine, and the kernel will accept it on boot. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/kern/kern_entropy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: thorpej Date: Thu Apr 30 04:18:07 UTC 2020 Modified Files: src/sys/uvm: uvm_map.c src/tests/lib/libc/sys: t_futex_ops.c Log Message: - In uvm_voaddr_acquire(), take an extra hold on the anon lock obj. - In uvm_voaddr_release(), if the anon ref count drops to 0, call uvm_anfree() rather than uvm_anon_release(). Unconditionally drop the anon lock, and release the extra hold on the anon lock obj. Fixes a panic that occurs if the backing store for a futex backed by an anon memory location is unmapped while a thread is waiting in the futex. Add a test case that reproduced the panic to verify that it's fixed. To generate a diff of this commit: cvs rdiff -u -r1.381 -r1.382 src/sys/uvm/uvm_map.c cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_futex_ops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: riastradh Date: Thu Apr 30 04:26:29 UTC 2020 Modified Files: src/sys/dev: random.c Log Message: Missed a spot -- need to use atomic_*. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/random.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/hppa
Module Name:src Committed By: skrll Date: Thu Apr 30 06:16:47 UTC 2020 Modified Files: src/sys/arch/hppa/hppa: pmap.c Log Message: Convert pmap_check_alias into a function that resolves any aliases issues to deal with the locking around entering a mapping of the same page with and alias issue in the same pmap (pmap lock already held in pmap_enter) This has the added benefit of only flushing the troublesome mappings. The locking could be simplified further here and an PV list iterator function with callback is probably useful. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/arch/hppa/hppa/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.