HardenedBSD/src c6c85b1share/man/man4 virtio.4, sys/arm64/arm64 pmap.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+26-2share/man/man4/virtio.4
+6-1sys/dev/virtio/pci/virtio_pci_modern.c
+6-1sys/dev/virtio/pci/virtio_pci.c
+4-0sys/dev/virtio/virtio.c
+2-2sys/netinet6/in6_ifattach.c
+1-1sys/arm64/arm64/pmap.c
+45-71 files not shown
+46-77 files

HardenedBSD/src dec5bdeshare/man/man4 virtio.4, sys/arm64/arm64 pmap.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+26-2share/man/man4/virtio.4
+6-1sys/dev/virtio/pci/virtio_pci_modern.c
+6-1sys/dev/virtio/pci/virtio_pci.c
+4-0sys/dev/virtio/virtio.c
+2-2sys/netinet6/in6_ifattach.c
+1-1sys/arm64/arm64/pmap.c
+45-71 files not shown
+46-77 files

HardenedBSD/src 12139c9sys/contrib/openzfs/contrib/initramfs/scripts zfs, sys/contrib/openzfs/module/os/linux/spl spl-math-compat.c spl-generic.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+600-189sys/contrib/openzfs/module/zfs/spa.c
+364-299sys/contrib/openzfs/contrib/initramfs/scripts/zfs
+191-177sys/sys/elf_common.h
+275-0sys/contrib/openzfs/module/os/linux/spl/spl-math-compat.c
+0-258sys/contrib/openzfs/module/os/linux/spl/spl-generic.c
+166-76sys/contrib/openzfs/module/zfs/ddt.c
+1,596-999128 files not shown
+4,101-1,688134 files

HardenedBSD/src c70755bshare/man/man4 virtio.4, sys/dev/virtio virtio.c

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
DeltaFile
+26-2share/man/man4/virtio.4
+6-1sys/dev/virtio/pci/virtio_pci_modern.c
+6-1sys/dev/virtio/pci/virtio_pci.c
+4-0sys/dev/virtio/virtio.c
+42-44 files

HardenedBSD/src 0272359sys/arm64/arm64 pmap.c, sys/arm64/include vm.h

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
DeltaFile
+1-1sys/arm64/arm64/pmap.c
+1-0sys/arm64/include/vm.h
+2-12 files

HardenedBSD/src b55bffesys/netinet6 in6_ifattach.c

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
DeltaFile
+2-2sys/netinet6/in6_ifattach.c
+2-21 files

HardenedBSD/src acf90e2sys/sys elf_common.h

elf_common.h: Sort SHT_ entries

Reviewed by:    jrtc27
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55488

(cherry picked from commit 0ff08b8c402b3c555125e4c72df0b80b4d084d56)
DeltaFile
+3-2sys/sys/elf_common.h
+3-21 files

HardenedBSD/src 2b6ba65sys/sys elf_common.h

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)
DeltaFile
+175-175sys/sys/elf_common.h
+175-1751 files

HardenedBSD/src 50a7a38sys/sys elf_common.h

elf_common.h: Add some AArch32 relocations

Reviewed by:    mmel
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55268

(cherry picked from commit 10ac7413c060b1496ef54e2338f487ea84f66206)
DeltaFile
+13-0sys/sys/elf_common.h
+13-01 files

HardenedBSD/src a8dbd83sys/contrib/openzfs/cmd zhack.c, sys/contrib/openzfs/contrib/initramfs/scripts zfs

zfs: merge openzfs/zfs at 1c702dda3 (zfs-2.4-release) into stable/15

OpenZFS 2.4.1

Notable upstream pull request merges:
 #16307 ccb7c82aa zdb: Add -O option for -r to specify object-id
 #17839 c4ad5e293 zpool: fix conflict with -v and -o options
 #17970 8a79d0968 ARC: Increase parallel eviction batching
 #17965 5e0f20088 ARC: Pre-convert zfs_arc_min_prefetch_ms
 #17981 e865ddad5 ZIO: ZIO_STAGE_DDT_WRITE is a blocking stage
 #18028 6482a27e8 Reduce dataset buffers re-dirtying
 #18033 135103a64 Defer async destroys on pool import
 #18043 242804370 Improve async destroy processing timing
 #18044 fa857113a DDT: Move logs searches out of the lock
 #18047 4905686e6 DDT: Switch to using ZAP _by_dnode() interfaces
 #18048 4ab2027f5 DDT: Add/use zap_lookup_length_uint64_by_dnode()
 #18055 96b1d2fae DDT: Fix compressed entry buffer size
 #18059 8dd01181a RAIDZ: Remove some excessive logging
 #18060 35ee242ab Reduce minimal scrub/resilver times

    [36 lines not shown]
DeltaFile
+600-189sys/contrib/openzfs/module/zfs/spa.c
+364-299sys/contrib/openzfs/contrib/initramfs/scripts/zfs
+275-0sys/contrib/openzfs/module/os/linux/spl/spl-math-compat.c
+0-258sys/contrib/openzfs/module/os/linux/spl/spl-generic.c
+166-76sys/contrib/openzfs/module/zfs/ddt.c
+153-6sys/contrib/openzfs/cmd/zhack.c
+1,558-828126 files not shown
+3,908-1,510132 files

HardenedBSD/src 960ef72libexec/rc/rc.d virtual_oss

virtual_oss: use hw.snd.default_unit by default

Reviewed by:    christos
MFC after:      1 week
Signed-off-by:  Quentin Thébault <quentin.thebault at defenso.fr>
Sponsored by:   Defenso
PR:             293130
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2043
(cherry picked from commit 06b466526a7fc35cc6fc5bf6f6269e7f3a0a7aea)
DeltaFile
+2-1libexec/rc/rc.d/virtual_oss
+2-11 files

HardenedBSD/src bb57f6dshare/man/man5 style.mdoc.5, usr.bin/diff3 diff3.c diff3.1

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+2-77share/man/man5/style.mdoc.5
+13-13usr.bin/diff3/diff3.c
+16-1usr.bin/diff3/diff3.1
+31-913 files

HardenedBSD/src 5585cfbshare/man/man5 style.mdoc.5, usr.bin/diff3 diff3.c diff3.1

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+2-77share/man/man5/style.mdoc.5
+13-13usr.bin/diff3/diff3.c
+16-1usr.bin/diff3/diff3.1
+31-913 files

HardenedBSD/src a5edf4clib/libusb libusb10.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+18-0lib/libusb/libusb10.c
+18-01 files

HardenedBSD/src f35cb87lib/libusb libusb10.c

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]
DeltaFile
+18-0lib/libusb/libusb10.c
+18-01 files

HardenedBSD/src 06ac71cshare/man/man5 style.mdoc.5

style.mdoc: Left angle bracket is not less-than

MFC after:              3 days
Differential Revision:  https://reviews.freebsd.org/D55300
DeltaFile
+1-1share/man/man5/style.mdoc.5
+1-11 files

HardenedBSD/src 47326cbshare/man/man5 style.mdoc.5

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]
DeltaFile
+0-67share/man/man5/style.mdoc.5
+0-671 files

HardenedBSD/src fae551bshare/man/man5 style.mdoc.5

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
DeltaFile
+1-9share/man/man5/style.mdoc.5
+1-91 files

HardenedBSD/src fe53412usr.bin/diff3 diff3.c diff3.1

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
DeltaFile
+13-13usr.bin/diff3/diff3.c
+16-1usr.bin/diff3/diff3.1
+29-142 files

HardenedBSD/src 0f575cdsbin/ipfw ipfw2.c, sbin/ipfw/tests test_add_rule.py

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+428-0tests/sys/netpfil/ipfw/lookup.sh
+184-137sys/netpfil/ipfw/ip_fw2.c
+155-137share/mk/src.libnames.mk
+231-12sbin/ipfw/tests/test_add_rule.py
+151-42sbin/ipfw/ipfw2.c
+162-17tests/atf_python/sys/netpfil/ipfw/insns.py
+1,311-34512 files not shown
+1,629-41818 files

HardenedBSD/src b2ff489sbin/ipfw ipfw2.c, sbin/ipfw/tests test_add_rule.py

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+428-0tests/sys/netpfil/ipfw/lookup.sh
+184-137sys/netpfil/ipfw/ip_fw2.c
+155-137share/mk/src.libnames.mk
+231-12sbin/ipfw/tests/test_add_rule.py
+151-42sbin/ipfw/ipfw2.c
+162-17tests/atf_python/sys/netpfil/ipfw/insns.py
+1,311-34512 files not shown
+1,629-41818 files

HardenedBSD/src 47a6a12sys/amd64/vmm/amd amdvi_hw.c, usr.sbin/bhyve usb_mouse.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+13-5usr.sbin/bhyve/usb_mouse.c
+1-9sys/amd64/vmm/amd/amdvi_hw.c
+14-142 files

HardenedBSD/src 5d9b185share/mk src.libnames.mk

share/mk/src.libnames.mk: Sort _DP entries

Requested by:   des
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55598
DeltaFile
+155-137share/mk/src.libnames.mk
+155-1371 files

HardenedBSD/src 32cd3eesbin/ipfw ipfw2.c ipfw.8, sbin/ipfw/tests test_add_rule.py

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
DeltaFile
+428-0tests/sys/netpfil/ipfw/lookup.sh
+184-137sys/netpfil/ipfw/ip_fw2.c
+231-12sbin/ipfw/tests/test_add_rule.py
+151-42sbin/ipfw/ipfw2.c
+162-17tests/atf_python/sys/netpfil/ipfw/insns.py
+119-32sbin/ipfw/ipfw.8
+1,275-2409 files not shown
+1,462-27915 files

HardenedBSD/src e01c29ausr.bin/from from.c, usr.bin/paste paste.c Makefile

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+39-22usr.bin/paste/paste.c
+12-7usr.bin/from/from.c
+8-0usr.bin/paste/Makefile
+59-293 files

HardenedBSD/src bcd6fefusr.bin/from from.c, usr.bin/paste paste.c Makefile

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+39-22usr.bin/paste/paste.c
+12-7usr.bin/from/from.c
+8-0usr.bin/paste/Makefile
+59-293 files

HardenedBSD/src e81e724sys/dev/asmc asmc.c asmcvar.h

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
DeltaFile
+9-2sys/dev/asmc/asmc.c
+3-0sys/dev/asmc/asmcvar.h
+12-22 files

HardenedBSD/src ffe7d45usr.bin/from from.c

from(1): style fixes

No functional changes.
DeltaFile
+4-4usr.bin/from/from.c
+4-41 files

HardenedBSD/src 4a4c885usr.bin/from from.c

from(1): Capsicumise

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed by: imp, oshogbo, markj (previous version)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1491
DeltaFile
+4-0usr.bin/from/from.c
+4-01 files

HardenedBSD/src dde5113usr.bin/from from.c

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
DeltaFile
+4-3usr.bin/from/from.c
+4-31 files