#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
180c0240 |
| 18-Sep-2023 |
Mina Galić <freebsd@igalic.co> |
virtio: remove virtio_alloc_virtqueues' flags arg
Summary: the flags argument is unused. Its initial design idea has been superceded by the addition of virtio_setup_intr and related APIs.
Sponsored
virtio: remove virtio_alloc_virtqueues' flags arg
Summary: the flags argument is unused. Its initial design idea has been superceded by the addition of virtio_setup_intr and related APIs.
Sponsored by: The FreeBSD Foundation
Reviewers: bryanv
Reviewed By: bryanv
Subscribers: cognet, imp
Differential Revision: https://reviews.freebsd.org/D41850
show more ...
|
#
f1c5a2e3 |
| 05-Sep-2023 |
John-Mark Gurney <jmg@FreeBSD.org> |
virtio_random: Pipeline fetching the data
Queue an initial fetch of data during attach and after every read rather than synchronously fetching data and polling for completion.
If data has not been
virtio_random: Pipeline fetching the data
Queue an initial fetch of data during attach and after every read rather than synchronously fetching data and polling for completion.
If data has not been returned from an previous fetch during read, just return EAGAIN rather than blocking.
Co-authored-by: John Baldwin <jhb@FreeBSD.org>
Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D41656
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
5c4c96d3 |
| 07-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
virtio: Remove unused devclass arguments to DRIVER_MODULE.
|
#
adbf7727 |
| 16-Mar-2022 |
Eugene Grosbein <eugen@FreeBSD.org> |
virtio_random(8): avoid deadlock at shutdown time
FreeBSD 13+ running as virtual guest may load virtio_random(8) driver by means of devd(8) unless the driver is blacklisted or disabled via device.hi
virtio_random(8): avoid deadlock at shutdown time
FreeBSD 13+ running as virtual guest may load virtio_random(8) driver by means of devd(8) unless the driver is blacklisted or disabled via device.hints(5). Currently, the driver may prevent the system from rebooting or shutting down correctly.
This change deactivates virtio_random at very late stage during system shutdown sequence to avoid deadlock that results in kernel hang.
PR: 253175 Tested by: tom MFC after: 3 days
show more ...
|
Revision tags: release/12.3.0, release/13.0.0 |
|
#
633218ee |
| 21-Jan-2021 |
Jessica Clarke <jrtc27@FreeBSD.org> |
virtio: Reduce boilerplate for device driver module definitions
Rather than have every device register itself for both virtio_pci and virtio_mmio, provide a VIRTIO_DRIVER_MODULE wrapper to declare b
virtio: Reduce boilerplate for device driver module definitions
Rather than have every device register itself for both virtio_pci and virtio_mmio, provide a VIRTIO_DRIVER_MODULE wrapper to declare both, merge VIRTIO_SIMPLE_PNPTABLE with VIRTIO_SIMPLE_PNPINFO and make the latter register for both buses. This also has the benefit of abstracting away the available transports and their names.
Reviewed by: bryanv Differential Revision: https://reviews.freebsd.org/D28073
show more ...
|
#
e6cc42f1 |
| 19-Jan-2021 |
Bryan Venteicher <bryanv@FreeBSD.org> |
virtio: Handle possible failure of virtio_finalize_features()
Try to standardize how drivers negotiate feature and the function names
Reviewed by: grehan (mentor) Differential Revision: https://rev
virtio: Handle possible failure of virtio_finalize_features()
Try to standardize how drivers negotiate feature and the function names
Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27930
show more ...
|
#
d2536a25 |
| 19-Jan-2021 |
Bryan Venteicher <bryanv@FreeBSD.org> |
virtio_random: Add modern (V1) support
Reviewed by: grehan (mentor) Differential Revision: https://reviews.freebsd.org/D27899
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
a1da7a46 |
| 07-May-2020 |
Jessica Clarke <jrtc27@FreeBSD.org> |
virtio: Support MMIO bus for all devices
The bus is independent of the device, so all devices can be attached to either a PCI bus or an MMIO bus. For example, QEMU's virtio-rng-device gives the MMIO
virtio: Support MMIO bus for all devices
The bus is independent of the device, so all devices can be attached to either a PCI bus or an MMIO bus. For example, QEMU's virtio-rng-device gives the MMIO variant of virtio-rng-pci, and is now detected.
Reviewed by: andrew, br, brooks (mentor) Approved by: andrew, br, brooks (mentor) Differential Revision: https://reviews.freebsd.org/D24730
show more ...
|
#
9b31a8da |
| 30-Dec-2019 |
Conrad Meyer <cem@FreeBSD.org> |
virtio_random(4): Drop no longer needed unload kludge
After r356194, source deregistration no longer races with concurrent use.
Reviewed by: bryanv, markm Differential Revision: https://reviews.fre
virtio_random(4): Drop no longer needed unload kludge
After r356194, source deregistration no longer races with concurrent use.
Reviewed by: bryanv, markm Differential Revision: https://reviews.freebsd.org/D22490
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|
#
0f6040f0 |
| 04-Jun-2019 |
Conrad Meyer <cem@FreeBSD.org> |
virtio(4): Add PNP match metadata for virtio devices
Register MODULE_PNP_INFO for virtio devices using the newbus PNP information provided by the previous commit. Matching can be quite simple; exis
virtio(4): Add PNP match metadata for virtio devices
Register MODULE_PNP_INFO for virtio devices using the newbus PNP information provided by the previous commit. Matching can be quite simple; existing probe routines only matched on bus (implicit) and device_type. The same matching criteria are retained exactly, but is now also available to devmatch(8).
Reviewed by: bryanv, markj; imp (earlier version) Differential Revision: https://reviews.freebsd.org/D20407
show more ...
|
#
ad5979f7 |
| 04-Jun-2019 |
Conrad Meyer <cem@FreeBSD.org> |
virtio_random(4): Fix random(4) integration
random(4) masks unregistered entropy sources. Prior to this revision, virtio_random(4) did not correctly register a random_source and did not function as
virtio_random(4): Fix random(4) integration
random(4) masks unregistered entropy sources. Prior to this revision, virtio_random(4) did not correctly register a random_source and did not function as a source of entropy.
Random source registration for loadable pure sources requires registering a poll callback, which is invoked periodically by random(4)'s harvestq kthread. The periodic poll makes virtio_random(4)'s periodic entropy collection redundant, so this revision removes the callout.
The current random source API is somewhat limiting, so simply fail to attach any virtio_random devices if one is already registered as a source. This scenario is expected to be uncommon.
While here, handle the possibility of short reads from the hypervisor random device gracefully / correctly. It is not clear why a hypervisor would return a short read or if it is allowed by spec, but we may as well handle it.
Reviewed by: bryanv (earlier version), markm Security: yes (note: many other "pure" random sources remain broken) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20419
show more ...
|
#
5ca5dfe9 |
| 01-Jun-2019 |
Conrad Meyer <cem@FreeBSD.org> |
random(4): Fix RANDOM_LOADABLE build
I introduced an obvious compiler error in r346282, so this change fixes that.
Unfortunately, RANDOM_LOADABLE isn't covered by our existing tinderbox, and it see
random(4): Fix RANDOM_LOADABLE build
I introduced an obvious compiler error in r346282, so this change fixes that.
Unfortunately, RANDOM_LOADABLE isn't covered by our existing tinderbox, and it seems like there were existing latent linking problems. I believe these were introduced on accident in r338324 during reduction of the boolean expression(s) adjacent to randomdev.c and hash.c. It seems the RANDOM_LOADABLE build breakage has gone unnoticed for nine months.
This change correctly annotates randomdev.c and hash.c with !random_loadable to match the pre-r338324 logic; and additionally updates the HWRNG drivers in MD 'files.*', which depend on random_device symbols, with !random_loadable (it is invalid for the kernel to depend on symbols from a module).
(The expression for both randomdev.c and hash.c was the same, prior to r338324: "optional random random_yarrow | random !random_yarrow !random_loadable". I.e., "random && (yarrow || !loadable)." When Yarrow was removed ("yarrow := False"), the expression was incorrectly reduced to "optional random" when it should have retained "random && !loadable".)
Additionally, I discovered that virtio_random was missing a MODULE_DEPEND on random_device, which breaks kld load/link of the driver on RANDOM_LOADABLE kernels. Address that issue as well.
PR: 238223 Reported by: Eir Nym <eirnym AT gmail.com> Reviewed by: delphij, markm Approved by: secteam(delphij) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20466
show more ...
|
#
af8f74ad |
| 27-May-2019 |
Conrad Meyer <cem@FreeBSD.org> |
virtio_random(4): Remove unneeded reference to device
The device_t always references the softc, so we can pass the device and obtain the softc instead of the other way around.
|
Revision tags: release/12.0.0 |
|
#
da2d1e9d |
| 29-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338298 through r338391.
|
#
19fa89e9 |
| 26-Aug-2018 |
Mark Murray <markm@FreeBSD.org> |
Remove the Yarrow PRNG algorithm option in accordance with due notice given in random(4).
This includes updating of the relevant man pages, and no-longer-used harvesting parameters.
Ensure that the
Remove the Yarrow PRNG algorithm option in accordance with due notice given in random(4).
This includes updating of the relevant man pages, and no-longer-used harvesting parameters.
Ensure that the pseudo-unit-test still does something useful, now also with the "other" algorithm instead of Yarrow.
PR: 230870 Reviewed by: cem Approved by: so(delphij,gtetlow) Approved by: re(marius) Differential Revision: https://reviews.freebsd.org/D16898
show more ...
|
Revision tags: release/11.2.0 |
|
#
718cf2cc |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0 |
|
#
b5ff185e |
| 12-Sep-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
ab875b71 |
| 14-Aug-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head, primarily for the 1.14.4.0 firmware.
|
Revision tags: release/10.2.0 |
|
#
4cd9b24e |
| 04-Jul-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r284737 through r285152.
|
#
d1b06863 |
| 30-Jun-2015 |
Mark Murray <markm@FreeBSD.org> |
Huge cleanup of random(4) code.
* GENERAL - Update copyright. - Make kernel options for RANDOM_YARROW and RANDOM_DUMMY. Set neither to ON, which means we want Fortuna - If there is no 'device rand
Huge cleanup of random(4) code.
* GENERAL - Update copyright. - Make kernel options for RANDOM_YARROW and RANDOM_DUMMY. Set neither to ON, which means we want Fortuna - If there is no 'device random' in the kernel, there will be NO random(4) device in the kernel, and the KERN_ARND sysctl will return nothing. With RANDOM_DUMMY there will be a random(4) that always blocks. - Repair kern.arandom (KERN_ARND sysctl). The old version went through arc4random(9) and was a bit weird. - Adjust arc4random stirring a bit - the existing code looks a little suspect. - Fix the nasty pre- and post-read overloading by providing explictit functions to do these tasks. - Redo read_random(9) so as to duplicate random(4)'s read internals. This makes it a first-class citizen rather than a hack. - Move stuff out of locked regions when it does not need to be there. - Trim RANDOM_DEBUG printfs. Some are excess to requirement, some behind boot verbose. - Use SYSINIT to sequence the startup. - Fix init/deinit sysctl stuff. - Make relevant sysctls also tunables. - Add different harvesting "styles" to allow for different requirements (direct, queue, fast). - Add harvesting of FFS atime events. This needs to be checked for weighing down the FS code. - Add harvesting of slab allocator events. This needs to be checked for weighing down the allocator code. - Fix the random(9) manpage. - Loadable modules are not present for now. These will be re-engineered when the dust settles. - Use macros for locks. - Fix comments.
* src/share/man/... - Update the man pages.
* src/etc/... - The startup/shutdown work is done in D2924.
* src/UPDATING - Add UPDATING announcement.
* src/sys/dev/random/build.sh - Add copyright. - Add libz for unit tests.
* src/sys/dev/random/dummy.c - Remove; no longer needed. Functionality incorporated into randomdev.*.
* live_entropy_sources.c live_entropy_sources.h - Remove; content moved. - move content to randomdev.[ch] and optimise.
* src/sys/dev/random/random_adaptors.c src/sys/dev/random/random_adaptors.h - Remove; plugability is no longer used. Compile-time algorithm selection is the way to go.
* src/sys/dev/random/random_harvestq.c src/sys/dev/random/random_harvestq.h - Add early (re)boot-time randomness caching.
* src/sys/dev/random/randomdev_soft.c src/sys/dev/random/randomdev_soft.h - Remove; no longer needed.
* src/sys/dev/random/uint128.h - Provide a fake uint128_t; if a real one ever arrived, we can use that instead. All that is needed here is N=0, N++, N==0, and some localised trickery is used to manufacture a 128-bit 0ULLL.
* src/sys/dev/random/unit_test.c src/sys/dev/random/unit_test.h - Improve unit tests; previously the testing human needed clairvoyance; now the test will do a basic check of compressibility. Clairvoyant talent is still a good idea. - This is still a long way off a proper unit test.
* src/sys/dev/random/fortuna.c src/sys/dev/random/fortuna.h - Improve messy union to just uint128_t. - Remove unneeded 'static struct fortuna_start_cache'. - Tighten up up arithmetic. - Provide a method to allow eternal junk to be introduced; harden it against blatant by compress/hashing. - Assert that locks are held correctly. - Fix the nasty pre- and post-read overloading by providing explictit functions to do these tasks. - Turn into self-sufficient module (no longer requires randomdev_soft.[ch])
* src/sys/dev/random/yarrow.c src/sys/dev/random/yarrow.h - Improve messy union to just uint128_t. - Remove unneeded 'staic struct start_cache'. - Tighten up up arithmetic. - Provide a method to allow eternal junk to be introduced; harden it against blatant by compress/hashing. - Assert that locks are held correctly. - Fix the nasty pre- and post-read overloading by providing explictit functions to do these tasks. - Turn into self-sufficient module (no longer requires randomdev_soft.[ch]) - Fix some magic numbers elsewhere used as FAST and SLOW.
Differential Revision: https://reviews.freebsd.org/D2025 Reviewed by: vsevolod,delphij,rwatson,trasz,jmg Approved by: so (delphij)
show more ...
|
#
416ba5c7 |
| 22-Jun-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with HEAD (r280229-r284686).
|