FreeBSD/src 0ffad4cusr.sbin/bhyve pci_passthru.c

bhyve: Tidy lobits handling in pci_passthru

- The lobits field in the "physical" BAR settings is never used, so
  don't bother setting it.

- Expand the comment explaining why the existing lobits are preserved
  (namely, to preserve the prefetch flag on memory BARs).

Reviewed by:    bnovkov
Differential Revision:  https://reviews.freebsd.org/D58894
DeltaFile
+4-3usr.sbin/bhyve/pci_passthru.c
+4-31 files

FreeBSD/src b00bb87usr.sbin/bhyve pci_emul.c

bhyve: Refactor initial PCI BAR setup

Fully initialize BARs with an address of 0 in pci_emul_alloc_bar()
instead of deferring some of that initialization to
pci_emul_assign_bar().  Now, the latter is only used to allocate an
initial address range for PCI BARs.

Note that this means that the pci_passthru model now overrides the
initial lobits after they are set removing the need for a workaround
in pci_emul_assign_bar().

Reviewed by:    bnovkov
Differential Revision:  https://reviews.freebsd.org/D58893
DeltaFile
+63-53usr.sbin/bhyve/pci_emul.c
+63-531 files

FreeBSD/src 3807c8busr.sbin/bhyve pci_emul.c

bhyve: Don't set the prefetch flag for large 64-bit memory BARs

The only device model that can create a large 64-bit memory BAR is the
passthru device model, and that device model reuses the lobits of the
existing BAR explicitly.

Fixes:          e87a6f3ef284 ("bhyve: use physical lobits for BARs of passthru devices")
DeltaFile
+1-2usr.sbin/bhyve/pci_emul.c
+1-21 files

FreeBSD/src b29dc5ausr.sbin/bhyve pci_emul.h pci_nvme.c

bhyve: Return void from pci_emul_alloc_bar

This function never fails.

Reviewed by:    bnovkov, chuck, markj
Differential Revision:  https://reviews.freebsd.org/D58579
DeltaFile
+6-16usr.sbin/bhyve/pci_emul.c
+2-5usr.sbin/bhyve/pci_fbuf.c
+1-5usr.sbin/bhyve/pci_nvme.c
+2-4usr.sbin/bhyve/pci_passthru.c
+1-1usr.sbin/bhyve/pci_emul.h
+12-315 files

FreeBSD/src 22293f8release/scripts make-manifest.sh

release: Use "debug info" for lib32 set description

This mirrors the changes applied to kernel debug symbol sets in commit
9a354a41be9a40c3c0a16cc20f4009d3b31679cc.

Reviewed by:    emaste
Sponsored by:   AFRL, DARPA
Differential Revision:  https://reviews.freebsd.org/D59058
DeltaFile
+1-1release/scripts/make-manifest.sh
+1-11 files

FreeBSD/src 2096687sys/netinet tcp_subr.c tcp_var.h, usr.bin/sockstat sockstat.1 main.c

sockstat: provide more BBLog information

When using -b, provide in addition to the BBLog state also the number
of entries stored at the endpoint, the corresponding upper limit and
the next sequence number to be assigned.

Reviewed by:            rrs
MFC after:              1 week
MFC to:                 stable/15
MFC to:                 stable/14
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D59131
DeltaFile
+47-3usr.bin/sockstat/main.c
+15-2usr.bin/sockstat/sockstat.1
+4-1sys/netinet/tcp_var.h
+3-0sys/netinet/tcp_subr.c
+69-64 files

FreeBSD/src a5ff412usr.bin/xinstall xinstall.c, usr.bin/xinstall/tests install_test.sh

install: Fix two bugs in stdin code

* Fix case where the source is - and the target exists.

* Only call chflags() (to remove flags that might prevent us from
  replacing an existing target) in the exists case; otherwise,
  to_sb.st_flags is uninitialized.

* Rename the source file in the stdin test case.

* Extend null and stdin test cases to cover the case where the
  target already exists.

PR:             297681
MFC after:      1 week
Fixes:          d34870708db9 ("install: Allow installing stdin")
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D59144
DeltaFile
+17-7usr.bin/xinstall/tests/install_test.sh
+3-3usr.bin/xinstall/xinstall.c
+20-102 files

FreeBSD/src f22ffd6sys/dev/intel spi_pci.c

intelspi: add Nova Lake SPI controller IDs

Add PCI device IDs for Nova Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59013
DeltaFile
+6-0sys/dev/intel/spi_pci.c
+6-01 files

FreeBSD/src 5937946sys/dev/intel spi_pci.c

intelspi: add Panther Lake SPI controller IDs

Add PCI device IDs for Panther Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59012
DeltaFile
+6-0sys/dev/intel/spi_pci.c
+6-01 files

FreeBSD/src eeb02a9sys/dev/intel spi_pci.c

intelspi: add Wildcat Lake SPI controller IDs

Add PCI device IDs for Wildcat Lake-generation LPSS peripheral SPI
controllers.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D59011
DeltaFile
+3-0sys/dev/intel/spi_pci.c
+3-01 files

FreeBSD/src 8bd30a7. UPDATING, usr.sbin/bhyve pci_nvme.c

bhyve: fix byte order for manually set NVMe eui64

Manually specified eui64 value gets converted to big endian twice:
first using htobe64() and then using be64enc(). On little-endian hosts
that results in a little-endian value instead of a big-endian.

Fix by removing htobe64() for a user submitted value.

Fixes:          409a80e5a434 ("bhyve: Create EUI64 for NVMe namespaces")
Reviewed by:    chuck
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
MFC after:      3 weeks
Differential Revision:  https://reviews.freebsd.org/D59080
DeltaFile
+10-0UPDATING
+1-1usr.sbin/bhyve/pci_nvme.c
+11-12 files

FreeBSD/src 01482delib/libsysdecode netlink.c

libsysdecode: decode PFNL_CMD_GET_RULESETS and PFNL_CMD_GET_RULESET

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+9-0lib/libsysdecode/netlink.c
+9-01 files

FreeBSD/src 5de5140sbin/pfctl pfctl.c, tests/sys/netpfil/pf anchor.sh

pfctl: fix printing of wildcard anchors

PR:             297839
MFC after:      1 week
Obtained from:  OpenBSD, henning <henning at openbsd.org>, 5b6657d4d8
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+30-0tests/sys/netpfil/pf/anchor.sh
+6-4sbin/pfctl/pfctl.c
+36-42 files

FreeBSD/src f01b594sys/dev/sound/usb uaudio.c

snd_uaudio: recognize hardware sidetone as a monitor

The Logitech H390, for instance, has the following interface layout:

~~
7 INPUT              34 INPUT            10 INPUT
  Mic (0x201)          Mic (0x201)         USB Stream (0x101)
   |                    |                     |
   v                    v                     |
 19 FEATURE           35 FEATURE              |
   |                    |                     |
   v                    v                     |
 25 EXTENSION           +------> 36 MIXER <---+
   |                              |
   v                              v
 13 OUTPUT                     22 FEATURE
 USB Stream (0x101)               |
                                  v
                               16 OUTPUT

    [29 lines not shown]
DeltaFile
+20-2sys/dev/sound/usb/uaudio.c
+20-21 files

FreeBSD/src ea7c339sys/net route.c

routing: Use fib-aware ifa lookup in ifa_ifwithroute()

Use ifa_ifwithaddr_fib() to fix fib-specific ifa lookups with route.

Differential Revision: https://reviews.freebsd.org/D59128
DeltaFile
+1-1sys/net/route.c
+1-11 files

FreeBSD/src 57775b3sys/arm64/iommu smmu.c

arm64/smmu: Fix undefined behaviour in Q_OVF

"1 << 31" is a signed int left shift 31 which is undefined as the shift
is too large. Use an unsigned int to make the value defined.

Sponsored by:   Arm Ltd
DeltaFile
+1-1sys/arm64/iommu/smmu.c
+1-11 files

FreeBSD/src 1ecf7d5sys/arm64/vmm/io vgic_internal.h vgic.c

arm64: vmm: Split out VGIC register handling to a common file

Reviewed by:    Sarah Walker <sarah.walker2 at arm.com>
Sponsored by:   Arm Ltd
DeltaFile
+9-128sys/arm64/vmm/io/vgic_v3.c
+78-1sys/arm64/vmm/io/vgic.c
+49-0sys/arm64/vmm/io/vgic_internal.h
+136-1293 files

FreeBSD/src 7823d30sys/arm64/vmm/io vgic_v3.c vgic_internal.h

arm64: vmm: Move vgic_v3 structures to header file

Move vgic_v3 structures in preparation for vgic interface rework for GICv5
support.

Reviewed by:    Sarah Walker <sarah.walker2 at arm.com>
Sponsored by:   Arm Ltd
DeltaFile
+83-0sys/arm64/vmm/io/vgic_internal.h
+4-49sys/arm64/vmm/io/vgic_v3.c
+87-492 files

FreeBSD/src 8a4fcb6sys/amd64/vmm x86.h x86.c

vmm: Emulate CPUID leaf 1Fh for guests

On an Intel N150 host a guest started with sockets=1, cores=4,
threads=1 reports "1 package(s) x 2 core(s) x 2 hardware threads"
instead of four cores with one thread each, while the host itself
detects its topology correctly.

A FreeBSD guest picks the topology leaf in topo_probe_intel_0xb(),
sys/x86/x86/mp_x86.c, and since 6badb512a94d it prefers leaf 1Fh over
leaf 0Bh whenever cpu_high is 1Fh or higher.  bhyve passes leaf 0
through unmodified, so the guest sees the maximum basic leaf of the
host, which is 1Fh or above on Alder Lake and newer, and takes that
path.  x86_emulate_cpuid(), sys/amd64/vmm/x86.c, derives the topology
from vm_get_topology() for leaves 1, 4 and 0Bh, but has no case for
1Fh, so the request ends up in default_leaf and the host values are
returned verbatim.  The guest therefore enumerates the topology of the
host: with an SMT shift of 1 in the host's leaf 1Fh and four vCPUs this
gives core_id_shift = 1 and pkg_id_shift = 2, which is exactly the
reported 2 cores x 2 threads.  Hosts whose maximum basic leaf is below

    [15 lines not shown]
DeltaFile
+4-1sys/amd64/vmm/x86.c
+1-0sys/amd64/vmm/x86.h
+5-12 files

FreeBSD/src ec58dbausr.bin/mkimg mkimg.c

mkimg: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks mkimg during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Make the existing 'sep' pointer const to fix the first case, and
for the second, introduce a new non-const pointer for strchr,
since we do modify the result in that case.

MFC after:      1 week
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58493

(cherry picked from commit 9fd8f5e761ba663c8e99eeff64c5a7fd7bcf1e05)
DeltaFile
+7-7usr.bin/mkimg/mkimg.c
+7-71 files

FreeBSD/src 3dababdusr.bin/rpcgen rpc_main.c rpc_svcout.c

rpcgen: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks rpcgen during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

For mkfile_output(), the pointed-to value is never modified, so
fix this by making the pointer const as well.

For open_log_file(), the current code modifies the supposedly const
value in-place to remove the filename suffix, which happens to work
but is wrong even in older versions of C.  Change the code to use a
printf "%.*s" format specifier to strip the suffix instead.

MFC after:      1 week
Reviewed by:    brooks
Sponsored by:   The FreeBSD Foundation

    [3 lines not shown]
DeltaFile
+13-6usr.bin/rpcgen/rpc_svcout.c
+2-1usr.bin/rpcgen/rpc_main.c
+15-72 files

FreeBSD/src 5b466d3usr.bin/xinstall xinstall.c

xinstall: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks xinstall during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

As the returned pointer is never used to modify the value, fix this
by making the temporary variable const.

MFC after:      1 week
Reviewed by:    ray, markj, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58492

(cherry picked from commit 2296c39a9ebc4f081d90b6554d8839e8cde8490a)
DeltaFile
+2-1usr.bin/xinstall/xinstall.c
+2-11 files

FreeBSD/src 4f5673busr.bin/m4 misc.c

m4: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks m4 during the
bootstrap build, since it assumes the return value is always a
mutable pointer.

Since the returned value is never modified, simply make the
temporary const.

MFC after:      1 week
Reviewed by:    bapt, dim
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58494

(cherry picked from commit 1d94e2e0f2ee21d5a4596efc0570d06e3dea0a6e)
DeltaFile
+1-1usr.bin/m4/misc.c
+1-11 files

FreeBSD/src 9c860aacontrib/elftoolchain/libelftc libelftc_dem_arm.c libelftc_dem_gnu2.c

libelftc: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks libelftc during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Since the returned pointer is never modified in either case, make
it const.

MFC after:      1 week
Reviewed by:    jkoshy, markj, dim, emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58497

(cherry picked from commit 85b07e977b04fceec84783facdb308492f17b155)
DeltaFile
+2-3contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c
+1-2contrib/elftoolchain/libelftc/libelftc_dem_arm.c
+3-52 files

FreeBSD/src d15778blib/libc/stdlib getopt_long.c getopt.c

libc: getopt{,_long}: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks getopt during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Since the pointed-to value is never modified, fix this by making
the pointer const.

MFC after:      1 week
Reviewed by:    emaste
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58488

(cherry picked from commit f1d98862044f7748c6f930e9d4339abc166a5b16)
DeltaFile
+1-1lib/libc/stdlib/getopt_long.c
+1-1lib/libc/stdlib/getopt.c
+2-22 files

FreeBSD/src 8c71eb5contrib/libucl/src ucl_util.c

libucl: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks libucl during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

Instead of assigning directly to params->prefix (which is const),
use a non-const temporary variable and assign the result after
we've done the modification.

MFC after:      1 week
Reviewed by:    bofh, bapt
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58490

(cherry picked from commit bcee560d390eb8aa8fd0f08a7a0bffb6e77fffc6)
DeltaFile
+4-3contrib/libucl/src/ucl_util.c
+4-31 files

FreeBSD/src 198ab9econtrib/mandoc mdoc.c out.c

mandoc: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks mandoc during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

In read.c, make the existing temporary pointer const, and for the
mandoc_asprintf() call, add a new mutable local.

In mdoc.c and out.c, since the data is mutable and is mutated here,
remove const from the temporary pointers.

MFC after:      1 week
Reviewed by:    fuz
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58495

(cherry picked from commit 9f18614d5353ce513511ccbf59d09e76c93f7bc9)
DeltaFile
+6-4contrib/mandoc/read.c
+2-2contrib/mandoc/out.c
+1-2contrib/mandoc/mdoc.c
+9-83 files

FreeBSD/src 876f29dusr.bin/sort sort.c

sort: Const correctness for C23

On some platforms, e.g. Linux Clang 22.1.8 / glibc 2.43, strchr()
now implements the C23 behaviour where passing a const pointer to
strchr() also returns a const pointer.  This breaks sort during
the bootstrap build, since it assumes the return value is always
a mutable pointer.

As the returned pointer is never used to modify the value, fix this
by making the temporary variable const.

MFC after:      1 week
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58491

(cherry picked from commit 78f842dda35b7280e8682f90506ff05b591c6b3a)
DeltaFile
+1-1usr.bin/sort/sort.c
+1-11 files

FreeBSD/src 3180d4d. Makefile.in configdata.pm, crypto/aes aes_x86core.c

openssl: import 3.0.22

This change adds OpenSSL 3.0.22 from upstream [1].

The 3.0.22 artifact was been verified via PGP key [2] and by SHA256 checksum [3].

This is a security patch release. The highest severity issue is medium.

More information about the release (from a high level) can be found in
the release notes [4].

Updated via [5] with `update_openssl.sh 3.0.22`.

1. https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz
2. https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz.asc
3. https://github.com/openssl/openssl/releases/download/openssl-3.0.22/openssl-3.0.22.tar.gz.sha256
4. https://github.com/openssl/openssl/blob/openssl-3.0.22/NEWS.md
5. https://codeberg.org/ngie/freebsd-powertools:shell/update_openssl.sh@c2f51140
DeltaFile
+0-34,159Makefile
+0-32,703configdata.pm
+0-11,231Makefile.in
+0-870crypto/aes/aes_x86core.c
+622-3test/evp_extra_test.c
+396-1test/endecode_test.c
+1,018-78,967125 files not shown
+3,685-79,452131 files

FreeBSD/src 185f1a1crypto/aes aes_x86core.c, doc/man3 X509_verify_cert.pod

openssl: import 3.5.8

This change adds OpenSSL 3.5.8 from upstream [1].

The 3.5.8 artifact was been verified via PGP key [2] and by SHA256 checksum [3].

This is a security patch release. The highest severity issue is medium.

More information about the release (from a high level) can be found in
the release notes [4].

Updated via [5] with `update_openssl.sh 3.5.8`.

1. https://github.com/openssl/openssl/releases/download/openssl-3.5.8/openssl-3.5.8.tar.gz
2. https://github.com/openssl/openssl/releases/download/openssl-3.5.8/openssl-3.5.8.tar.gz.asc
3. https://github.com/openssl/openssl/releases/download/openssl-3.5.8/openssl-3.5.8.tar.gz.sha256
4. https://github.com/openssl/openssl/blob/openssl-3.5.8/NEWS.md
5. https://codeberg.org/ngie/freebsd-powertools:shell/update_openssl.sh@c2f51140
DeltaFile
+0-867crypto/aes/aes_x86core.c
+851-3test/evp_extra_test.c
+394-125test/evp_extra_test2.c
+476-32test/endecode_test.c
+439-61doc/man3/X509_verify_cert.pod
+337-5test/radix/quic_tests.c
+2,497-1,093256 files not shown
+8,213-2,267262 files