FreeBSD/src 5379c46usr.sbin/bhyve virtio.c

bhyve/virtio: check negotiated_caps for indirect descriptor support

vq_getchain() erroneously checked vc_hv_caps for indirect descriptor
support when it encountered an indirect descriptor. vc_hv_caps is used
in feature negotiation to advertise what features our device emulation
supports, but we should really check what features we have negotiated
with the driver.

Reviewed by: corvink
Differential Revision: https://reviews.freebsd.org/D53465
DeltaFile
+1-1usr.sbin/bhyve/virtio.c
+1-11 files

FreeBSD/src 0ff1f58sys/netinet ip_mroute.c

ip_mroute: EVENTHANDLER_REGISTER does not fail

No functional change intended.

MFC after:      1 week
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit 0f1e1350704af555a4b30136f5f3d16db6f2dc51)
DeltaFile
+0-6sys/netinet/ip_mroute.c
+0-61 files

FreeBSD/src b003726sys/netinet6 in6.c, tests/sys/netinet6 ndp.sh

in6: Modify address prefix lifetimes when updating address lifetimes

When one uses SIOCAIFADDR_IN6 to add a v6 address, it's possible to set
the preferred and valid lifetimes of the address.  If the address
already exists, this ioctl will recalculate and update the expiry times
based on the provided timestamps.

When adding a new address, the lifetimes are inherited by the prefix as
well, but only if we create a new prefix.  If the prefix already exists,
as it will in the case where an address is being updated rather than
being added, we do not touch the prefix lifetimes at all.  This means
that the original address lifetime still applies to the route associated
with that prefix, so when the prefix expires, the route goes away.

This behaviour doesn't make a lot of sense: if the admin updates an
address lifetime, we should ensure that the prefix lifetime is updated
too.  Make that change, ensuring that we do not shorten the prefix
lifetime, as the prefix might be shared among multiple interface
addresses.

    [11 lines not shown]
DeltaFile
+76-0tests/sys/netinet6/ndp.sh
+22-0sys/netinet6/in6.c
+98-02 files

FreeBSD/src e676efasys/netinet6 nd6_rtr.c in6.c

in6: Add a helper function to compute expiry times

Tidy up a bunch of places that have the same duplicated logic.  Simplify
callers of in6_init_prefix_ltimes().  No functional change intended.

Reviewed by:    pouria, zlei, tuexen, glebius
MFC after:      2 weeks
Sponsored by:   OPNsense
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54561

(cherry picked from commit fb08f80eaf90eb7ace202d8604634fc181be8980)
DeltaFile
+7-31sys/netinet6/nd6_rtr.c
+13-10sys/netinet6/in6.c
+2-0sys/netinet6/in6.h
+22-413 files

FreeBSD/src b773da1. MAINTAINERS, .github CODEOWNERS

MAINTAINERS, CODEOWNERS: Update capsicum-test

Fixes: 670b568ec1c3 ("capsicum-test: Move out of contrib")
Sponsored by: The FreeBSD Foundation
DeltaFile
+1-1MAINTAINERS
+1-1.github/CODEOWNERS
+2-22 files

FreeBSD/src 8c1de31release/pkg_repos release-dvd.conf, release/scripts pkg-stage.sh

release: Ship firmware from kmods repo on DVD

The packages for X.Y-RELEASE are a snapshot of the quarterly branch
for stable/X, i.e. typically built on X.(Y-1)-RELEASE.  (The case of
Y=0 is an exception for obvious reasons.)  This works for most ports
but not for kernel modules, which may need to be built on the release
in question; this is why we have a separate "kmods" repository.

Make sure that we put the packages from the kmods repository onto the
mini-pkg-repo on the DVD rather than shipping unusable firmware.

Reviewed by:    bz
MFC after:      1 week
Sponsored by:   https://www.patreon.com/cperciva
Differential Revision:  https://reviews.freebsd.org/D52581

(cherry picked from commit bda8028146694ee490543b35e3349e060936fde4)
DeltaFile
+18-7release/scripts/pkg-stage.sh
+7-0release/pkg_repos/release-dvd.conf
+25-72 files

FreeBSD/src b0fbed2release/pkg_repos release-dvd.conf, release/scripts pkg-stage.sh

release: Ship firmware from kmods repo on DVD

The packages for X.Y-RELEASE are a snapshot of the quarterly branch
for stable/X, i.e. typically built on X.(Y-1)-RELEASE.  (The case of
Y=0 is an exception for obvious reasons.)  This works for most ports
but not for kernel modules, which may need to be built on the release
in question; this is why we have a separate "kmods" repository.

Make sure that we put the packages from the kmods repository onto the
mini-pkg-repo on the DVD rather than shipping unusable firmware.

Reviewed by:    bz
MFC after:      1 week
Sponsored by:   https://www.patreon.com/cperciva
Differential Revision:  https://reviews.freebsd.org/D52581

(cherry picked from commit bda8028146694ee490543b35e3349e060936fde4)
DeltaFile
+18-7release/scripts/pkg-stage.sh
+7-0release/pkg_repos/release-dvd.conf
+25-72 files

FreeBSD/src 52ebb8asbin/ifconfig ifconfig_netlink.c

ifconfig: fix 'ifconfig -l link'

The rtnetlink(4) RTM_GETADDR does not list link level addresses, thus
the correct match for interfaces that have a link level address should
be based on what was returned by RTM_GETLINK.

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D41586

(cherry picked from commit 6f3947be2aff9350514b5a414104d0afaeb53cdf)
DeltaFile
+7-1sbin/ifconfig/ifconfig_netlink.c
+7-11 files

FreeBSD/src 0e82cd0sbin/ifconfig af_inet6.c, sbin/ifconfig/tests inet6.sh

ifconfig: fix removing IPv6 addresses

Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit da50f49977cc4e6aae55cb2379313599249a8dd2)
DeltaFile
+30-0sbin/ifconfig/tests/inet6.sh
+1-1sbin/ifconfig/af_inet6.c
+31-12 files

FreeBSD/src 151dcadsbin/ifconfig ifconfig_netlink.c af_link.c

ifconfig: fix 'ifconfig -l ether'

When matching interfaces for being Ethernet, use same trick that
the link module does - pass if_type through convert_iftype().
That restores historicaly behaviour of listing lagg(4) ports.

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D41585

(cherry picked from commit 31016aa0be6dbf7556a91dda14cfe1ff0dcf933b)
DeltaFile
+14-1sbin/ifconfig/ifconfig_netlink.c
+0-11sbin/ifconfig/af_link.c
+2-0sbin/ifconfig/ifconfig.h
+16-123 files

FreeBSD/src 7bdf066sbin/ifconfig ifconfig.c

ifconfig: fix logical error in interface matching for '-l ether'

This affects only ifconfig(8) compiled WITHOUT_NETLINK_SUPPORT, which
is not the default.

Reviewed by:            melifaro
Differential Revision:  https://reviews.freebsd.org/D41584
Fixes:                  d1cd0344f7b7d81beda04c3cb8cfee99351c3eb8

(cherry picked from commit 24a81a968d21b3eef1a0a2d786859b274546bd34)
DeltaFile
+1-1sbin/ifconfig/ifconfig.c
+1-11 files

FreeBSD/src 39148cbusr.sbin/jail Makefile

usr.sbin/jail/Makefile: remove riscv linker workaround

It links fine with newer binutils 2.44 (and GCC 15), so the workaround
can be dropped.

Reviewed by:    emaste
PR:             242109
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55083
DeltaFile
+0-7usr.sbin/jail/Makefile
+0-71 files

FreeBSD/src 1364e7dsys/powerpc/aim mmu_oea64.c mmu_oea64.h

powerpc64: Fix disappearing low memory on radix MMU systems (POWER9)

The FreeBSD radix implementation piggybacks on the physical memory
allocation function from the HPT implementation, but did not share
the same state information for number of physical memory ranges.
This led to a situation where the HPT physical memory allocator
would attempt to shift the physical memory ranges in the shared
range table, but would use the wrong number of entries, thus
overwriting the large segment of low memory that should have been
available for e.g. 32-bit DMA.

Incorrect physical memory map:

real memory  = 33997058048 (32422 MB)
available KVA = 34359619583 (32767 MB)
Physical memory chunk(s):
0x0000000000003000 - 0x0000000000002fff, 0 bytes (0 pages)
0x000000000000e000 - 0x000000000000ffff, 8192 bytes (2 pages)
0x0000000000094000 - 0x0000000000ffffff, 16171008 bytes (3948 pages)

    [27 lines not shown]
DeltaFile
+2-1sys/powerpc/aim/mmu_oea64.c
+1-0sys/powerpc/aim/mmu_oea64.h
+0-1sys/powerpc/aim/mmu_radix.c
+3-23 files

FreeBSD/src cf41d11sys/conf kern.pre.mk, sys/kern link_elf.c

riscv: implement kernel ifunc resolution

This completes the set of architectures implementing this feature.

Move the calls to sched_instance_select() and link_elf_ireloc() later in
initriscv(), after identify_cpu(0). There will be more information
available to any resolver functions at this time.

Reviewed by:    imp, kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55082
DeltaFile
+8-3sys/riscv/riscv/elf_machdep.c
+4-2sys/riscv/riscv/machdep.c
+2-3sys/conf/kern.pre.mk
+0-2sys/riscv/include/ifunc.h
+0-2sys/kern/link_elf.c
+14-125 files

FreeBSD/src 0d3652fsys/kern sched_shim.c

sched_shim: Drop the no-ifunc case

Now all architectures support kernel ifunc resolvers. Therefore, the
alternate implementation can be removed.

Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55114
DeltaFile
+0-8sys/kern/sched_shim.c
+0-81 files

FreeBSD/src 157d666usr.bin/diff/tests diff_test.sh

diff: Correctly declare tests

Sponsored by:   Klara, Inc.
Fixes:          5fc739eb5949 ("diff: Fix integer overflows in Stone algorithm")
Fixes:          270492602b9b ("diff: Add test case for pagination resource leak")
Fixes:          590126789c84 ("diff: Don't compare a file or directory to itself")
DeltaFile
+4-1usr.bin/diff/tests/diff_test.sh
+4-11 files

FreeBSD/src c5ee920usr.sbin/wpa/wpa_supplicant wpa_supplicant.conf.5

wpa_supplicant.conf.5: Remove removed variables

2005-09-25 - wpa_supplicant v0.4.5 removed "server_nai"
2008-02-22 - wpa_supplicant v0.6.3 removed "eappsk" and "nai"

PR:                     284126
MFC after:              3 days
Reviewed by:            carlavilla, ziaee
Reported by:            J.R. Oldroyd <fbsd at opal.com>
Differential Revision:  https://reviews.freebsd.org/D49010
DeltaFile
+0-6usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5
+0-61 files

FreeBSD/src dc2ec1csbin/geom/core geom.8

geom.8: Improve classes list into a table

Add missing entries MD, VFS, and DISK. Refactor list into a three
column table, so the data is all visible at once, buying us ten lines
at MANWIDTH 80, and still rendering nicely at MANWIDTH 59.

PR:             292530
MFC after:      3 days
Reported by:    Slawomir Wojciech Wojtczak <vermaden at interia.pl>
DeltaFile
+9-36sbin/geom/core/geom.8
+9-361 files

FreeBSD/src b18604esys/modules/hyperv/pcib Makefile

hyperv: Add opt_acpi.h to SRCS

Add opt_acpi.h to SRCS as it is required by the hyper-v pcib sources.

Reviewed by: imp
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D48166
DeltaFile
+1-0sys/modules/hyperv/pcib/Makefile
+1-01 files

FreeBSD/src ee44ab9usr.bin/diff diffdir.c

diff: Fix build

rc must be defined first.

Fixes:          590126789c84
MFC after:      1 week
X-MFC with:     590126789c84
DeltaFile
+2-0usr.bin/diff/diffdir.c
+2-01 files

FreeBSD/src d15d6bfsys/dev/acpica acpi.c

acpi: Fix trying to enter NONE state

In acpi_system_eventhandler_sleep(), I forgot to update
ACPI_STATE_UNKNOWN when switching to new sleep types.

Reviewed by:    olce
Approved by:    olce
Fixes:  97d152698f48 ("acpi: Use sleep types defined in sys/power.h")
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55119
DeltaFile
+1-1sys/dev/acpica/acpi.c
+1-11 files

FreeBSD/src d35e369sys/dev/acpi_support acpi_ibm.c, sys/dev/syscons syscons.c

sys/power.h: enum power_sstate_transition

Turn POWER_SLEEP_STATE_* defines into enum power_sstate_transition.

Reviewed by:    markj
Approved by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52497
DeltaFile
+10-8sys/sys/power.h
+7-6sys/kern/subr_power.c
+6-1sys/dev/acpi_support/acpi_ibm.c
+2-2sys/dev/vt/vt_core.c
+2-2sys/dev/syscons/syscons.c
+27-195 files

FreeBSD/src b3f23aesbin/reboot nextboot.sh

nextboot: Reimplement missing -a option

PR:             260520
MFC after:      3 days
Fixes:          e307eb94ae52 ("loader: zfs should support bootonce an nextboot")

(cherry picked from commit 33510b16e663bde5be5e4a56ccb17f848c41ef4e)
DeltaFile
+4-0sbin/reboot/nextboot.sh
+4-01 files

FreeBSD/src 27e73a1lib/libc/tests/gen dir2_test.c

libc/tests: Clean up *dir() tests

Mainly, avoid reusing the name of one of the functions we should be
testing (but aren't) for local variables.

Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55054

(cherry picked from commit d70b9eb74fc4aa430bd2ff4bca37e6a9b6c8004f)
DeltaFile
+13-15lib/libc/tests/gen/dir2_test.c
+13-151 files

FreeBSD/src e3d430clib/libc/gen dirfd.c

libc: Fix missing include

Although not needed on FreeBSD due to namespace pollution, we should
technically #include <stddef.h> to secure a definition of NULL.

Fixes:          5074d5c9845e ("libc: Improve POSIX conformance of dirfd()")
(cherry picked from commit 1c00d5a3b234ef937d848956027e9de5ea8010f9)
DeltaFile
+1-0lib/libc/gen/dirfd.c
+1-01 files

FreeBSD/src 6ff3a18lib/libc/gen directory.3 dirfd.c

libc: Improve POSIX conformance of dirfd()

POSIX states that dirfd() should set errno to EINVAL and return -1 if
dirp does not refer to a valid directory stream.  Our interpretation is
that this applies if dirp is null or the file descriptor associated
with it is negative.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55025

(cherry picked from commit 5074d5c9845e142883cdbb9ad212be66e57615d0)
DeltaFile
+13-1lib/libc/gen/directory.3
+5-0lib/libc/gen/dirfd.c
+18-12 files

FreeBSD/src 762729blib/libc/gen directory.3 telldir.c

libc: Clean up *dir() code

Fix style nits (mostly whitespace issues) and clean up the manual page.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55024

(cherry picked from commit 387ae6390534b6e9b48931840e7bc76eeb0b258d)
DeltaFile
+40-38lib/libc/gen/directory.3
+2-2lib/libc/gen/telldir.c
+0-3lib/libc/gen/dirfd.c
+0-2lib/libc/gen/scandir.c
+0-1lib/libc/gen/opendir.c
+0-1lib/libc/gen/closedir.c
+42-473 files not shown
+43-499 files

FreeBSD/src 0018cfdlib/libc/tests/gen dir2_test.c

libc/tests: Clean up *dir() tests

Mainly, avoid reusing the name of one of the functions we should be
testing (but aren't) for local variables.

Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55054

(cherry picked from commit d70b9eb74fc4aa430bd2ff4bca37e6a9b6c8004f)
DeltaFile
+13-15lib/libc/tests/gen/dir2_test.c
+13-151 files

FreeBSD/src 77dedealib/libc/gen directory.3 dirfd.c

libc: Improve POSIX conformance of dirfd()

POSIX states that dirfd() should set errno to EINVAL and return -1 if
dirp does not refer to a valid directory stream.  Our interpretation is
that this applies if dirp is null or the file descriptor associated
with it is negative.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55025

(cherry picked from commit 5074d5c9845e142883cdbb9ad212be66e57615d0)

libc: Fix missing include

Although not needed on FreeBSD due to namespace pollution, we should
technically #include <stddef.h> to secure a definition of NULL.


    [2 lines not shown]
DeltaFile
+13-1lib/libc/gen/directory.3
+6-0lib/libc/gen/dirfd.c
+19-12 files

FreeBSD/src b614c98lib/libc/gen directory.3 telldir.c

libc: Clean up *dir() code

Fix style nits (mostly whitespace issues) and clean up the manual page.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55024

(cherry picked from commit 387ae6390534b6e9b48931840e7bc76eeb0b258d)
DeltaFile
+40-38lib/libc/gen/directory.3
+2-2lib/libc/gen/telldir.c
+0-3lib/libc/gen/dirfd.c
+0-2lib/libc/gen/scandir.c
+0-1lib/libc/gen/opendir.c
+0-1lib/libc/gen/rewinddir.c
+42-473 files not shown
+43-499 files