virtio: add loader tunables to sysctl
virtio_pci uses two loader tunables that should be more visible.
This patch adds these loader tunables to sysctl and describes them
in the virtio(4) man page.
Reviewed by: imp (erlier version), tuexen
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55533
arm64/pmap: fix pmap_is_valid_memattr()
The function pmap_is_valid_memattr(pmap, mode) checks whether the
given variable mode is between the two constant values
VM_MEMATTR_DEVICE and VM_MEMATTR_WRITE_THROUGH.
After the code for this function was written, the value of
VM_MEMATTR_DEVICE changed from 0 to 4. Since VM_MEMATTR_WRITE_THROUGH
is still 3, the condition is always false.
This patch changes the condition to check whether mode is equal to any
of the VM_MEMATTR* constants.
Reviewed by: andrew, tuexen
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55534
netinet6: Fix memory leak on auto_linklocal
release the refcount of link-local prefix information to ensure
it gets freed when the address is deleted.
Reviewed By: zlei, ivy
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55593
sys: Restore sorting in sys/elf_common.h
These various definitions are meant to be kept sorted by machine prefix.
Fixes: 2bb61497ca76 ("elf_common.h: Add definitions for LoongArch ELF files")
(cherry picked from commit b7ef4f4b230f01968473269f280bd7e4e86a3ec9)
libusb: dequeue next transfer on completion to prevent stalls
The transfer proxy callbacks (bulk/interrupt, control, isochronous)
only called libusb10_submit_transfer_sub() in the START path to
pipeline the second kernel transfer slot. On completion or error,
no attempt was made to dequeue the next pending transfer from
tr_head onto the now-free slot.
When more than two async transfers were submitted on the same
endpoint, the third (and subsequent) transfers would remain stuck
on tr_head indefinitely, since no completion ever triggered their
submission. This caused a protocol-level deadlock in applications
like adb that submit header + payload + zero-length terminator as
three separate bulk transfers in sequence.
Fix by calling libusb10_submit_transfer_sub() after every
libusb10_complete_transfer() in all three proxy callbacks.
MFC After: 2 weeks
[4 lines not shown]
style.mdoc: Remove synopsis formatting advice
Remove incorrect advice. The first rule was no spaces padding pipes
when showing alternates. Almost universally we not do this, and third
party manuals do not either. The second was using Cm to mark up symbols.
This advice is in conflict with mdoc(7), and the extended documentation
on mdoc linked below, which is also linked at the bottom of mdoc(7).
Conflicting information in our docs is a natural result of documentation
proliferation. The most important thing we can do to reduce technical
debt in the documentation is reduce the amount of doc overlap. Excessive
technical debt and conflicting rules is a barrier to new contributors.
This type of work requires thorough expertise, is not glamorous at all,
and to add insult to injury, is socially unsafe. To get new contributors
to the docs project, we must deduplicate documentation.
We have the mdoc manual, examples/mdoc, style.mdoc, and the fdp chapter
on manual pages. With this many, they will inevitably come to contain
conflicting information, and people will learn not to read them or work
[5 lines not shown]
style.mdoc: Li macro is undeprecated for some time
Previously, the mdoc linter warned against using Li as it was deprecated
upstream. However, upstream undeprecated it since last year. As usual
when it comes to style, the best thing to do is to follow the existing
style of the page. We have many manuals which prefer double quotes.
MFC after: 3 days
Citation: https://cvsweb.bsd.lv/mandoc/mdoc.7?rev=1.297
Differential Revision: https://reviews.freebsd.org/D55297
diff3: Produce correct exit status
Use exit status 2 for errors, 1 only to indicate that differences were
found between the inputs (in some operating modes).
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: ngie, bapt
Differential Revision: https://reviews.freebsd.org/D55608
share/mk/src.libnames.mk: Sort _DP entries
Requested by: des
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55598
ipfw: add support for masked ip-address lookups
Current radix-based implementation of lookup tables in ipfw does
not support non-contiguous prefixes while this type of lookup is
needed to write CPU-effective firewall configurations.
For some of the cases we can reach the goal using a masked table
lookup by adding masked (e.g. zero non-significant bits) records
into a table and then zero non-significant bits in lookup key
prior to making a table lookup.
Obtained from: Yandex LLC
MFC after: 3 weeks
Relnotes: yes
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D53694
asmc: output the SMC firmware revision on attach
The SMC firmware revision can prove helpful when determining why the
behavior of a given controller varies from the maintainers' expected
behavior.
This should be a sysctl (eventually), but for now dumping out the
information via `device_printf(..)` suffices, given that only one
asmc(4) compatible device can exist in an Apple platform at any
given point in time. This will become a sysctl in the future after
additional improvements are incorporated from OpenBSD and NetBSD.
MFC after: 1 week
Obtained from: https://github.com/openbsd/src/ (sys/dev/acpi/asmc.c @ 142d064)
Differential Revision: https://reviews.freebsd.org/D55577
from(1): Replace magic exit codes with standard macros
Signed-off-by: Faraz Vahedi <kfv at kfv.io>
With minor changes from committer.
Reviewed by: imp, oshogbo, markj (previous version)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1491