FreeBSD/src 7c22ddasys/netinet icmp6.h, sys/netinet6 in6_var.h nd6.h

nd6: Add router address and DHCPv6-PD flags in PIO headers

Make R-bit per RFC 6275 8.3 and P-bit per RFC 9762 7.1 in
Prefix Information option available to userland for future implementations.

RFC 9762 7.1: For each interface, the client MUST keep a list of every prefix
that was received from a PIO with the P flag set and currently has a non-zero
preferred lifetime.

Differential Revision: https://reviews.freebsd.org/D56207
DeltaFile
+5-1sys/netinet6/in6_var.h
+4-2sys/netinet/icmp6.h
+1-0sys/netinet6/nd6.h
+10-33 files

FreeBSD/src e188442sys/kern sys_procdesc.c

fget_procdesc(): change error for non-procdesc type from EBADF to EINVAL

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/kern/sys_procdesc.c
+1-11 files

FreeBSD/src 664ad9asys/dev/acpica acpi_cpu.c

acpi_cpu(4): Call ACPI_GET_FEATURES() on a reset 'features' variable

This is to prevent child drivers from using the features returned by
previous drivers (in an arbitrary order).  None of the existing ones do
that, so this is purely defensive.

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-1sys/dev/acpica/acpi_cpu.c
+2-11 files

FreeBSD/src fed4979sys/kern sys_process.c

kern/sys_process.c: remove extra ()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/kern/sys_process.c
+1-11 files

FreeBSD/src 3abd3d3sys/netinet6 in6_pcb.c

inpcb: return ENOMEM if bind(2) fails to allocate lbgroup

This is exactly the same as the second part of IPv4's change
136c5e17b61a1/D49153.
DeltaFile
+6-4sys/netinet6/in6_pcb.c
+6-41 files

FreeBSD/src ca4eb3fsys/netinet6 in6_pcb.c

inpcb: do not set INP_ANONPORT until successful operation
DeltaFile
+2-2sys/netinet6/in6_pcb.c
+2-21 files

FreeBSD/src a48a275sys/sys proc.h

sys/proc.h: remove spurious blank lines

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+0-2sys/sys/proc.h
+0-21 files

FreeBSD/src 1f5fe8asys/kern kern_exit.c sys_procdesc.c, sys/sys procdesc.h

kern: change several int types to bools

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+3-3sys/kern/kern_exit.c
+3-3sys/kern/sys_procdesc.c
+1-1sys/sys/procdesc.h
+7-73 files

FreeBSD/src fc09c7fsys/net iflib.c

iflib: Remove an unused field from struct iflib_rxq

Reported by:    Alexander Sideropoulos <Alexander.Sideropoulos at netapp.com>
MFC after:      1 week
DeltaFile
+0-1sys/net/iflib.c
+0-11 files

FreeBSD/src 8318199sys/kern link_elf.c

linker: Recognize SHT_INIT_ARRAY sections as constructor sections

We do this already for ET_REL files, but it was missed here.  Note that
this function operates only on dynamically loaded files, not on
preloaded files.

Reviewed by:    kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58245
DeltaFile
+3-2sys/kern/link_elf.c
+3-21 files

FreeBSD/src 4b0ae7estand/common load_elf.c

stand: Recognize SHT_INIT_ARRAY sections as constructor sections

Pass such a section to the kernel using modinfo, otherwise link_elf.c
won't execute constructors for the file.  This is required for KASAN,
otherwise redzones for global buffers are not poisoned during boot.

Reviewed by:    kib
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58244
DeltaFile
+2-1stand/common/load_elf.c
+2-11 files

FreeBSD/src 00e8808lib/libc/locale localeconv.c

libc locale/localeconv.c: use release semantic when clearing locale_changed

PR:     296410

(cherry picked from commit 4efbcf36a0d49ab142023a767871532f515f1381)
DeltaFile
+2-2lib/libc/locale/localeconv.c
+2-21 files

FreeBSD/src 40c611dsbin/pfctl pfctl_table.c

pfctl: fix incorrect errno checks

These calls return an error value, they do not set errno. Check their
return values.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+15-4sbin/pfctl/pfctl_table.c
+15-41 files

FreeBSD/src f2202absys/kern uipc_mbuf.c

mbuf: make m_unshare() allow unmapped mbufs

m_unshare() had crashed if unmapped mbufs exist in the mbuf chain.
This was because memcpy() with mtod() was used without making sure that
the mbuf was mapped. Use m_copydata() that cares unmapped mbufs instead.

Reviewed by:    gallatin
Differential Revision:  https://reviews.freebsd.org/D58189
DeltaFile
+7-5sys/kern/uipc_mbuf.c
+7-51 files

FreeBSD/src ddbf892sbin/pfctl pfctl_table.c

pfctl: fix CREATE_TABLE error handling

pfr_add_table() does not set errno, it returns an error (now).
Read the error code from the return value so we display the correct
error message to the user.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+4-3sbin/pfctl/pfctl_table.c
+4-31 files

FreeBSD/src 8440093sys/sys _uexterror.h exterrvar.h

exterr: allow exterr to fit pointers on CHERI targets

Switch to uint64ptr_t which is a uint64_t on traditional architectures
and a uintptr_t on CHERI architectures.  This has no ABI impact on
non-CHERI kernels.

Fix truncation of 64-bit values on 32-bit kernels.

Reviewed by:    kib
Effort:         CHERI upstreaming
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D58056
DeltaFile
+3-3sys/sys/_uexterror.h
+3-3sys/sys/exterrvar.h
+2-2sys/sys/_exterr.h
+8-83 files

FreeBSD/src db3eca2sys/kern sys_generic.c, sys/sys syscallsubr.h

exterrctl(2): add kern_exterrctl

Reviewed by:    kib
Effort:         CHERI upstreaming
Sponsored by:   DARPA, AFRL
Differential Revision:  https://reviews.freebsd.org/D58055
DeltaFile
+11-5sys/kern/sys_generic.c
+1-0sys/sys/syscallsubr.h
+12-52 files

FreeBSD/src b3b4763sys/sys exterrvar.h

sys/exterrvar.h: forward declare struct thread

Remove dependency on sys/proc.h.

Reviewed by:    imp
Sponsored by:   Innovate UK
Differential Revision:  https://reviews.freebsd.org/D58235
DeltaFile
+2-0sys/sys/exterrvar.h
+2-01 files

FreeBSD/src 896f9basys/dev/sound/pcm channel.c buffer.c

sound: Pass format and speed as arguments to sndbuf_create()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 815dc35b7b5ed694fc1986d054149e375b8a17bd)
DeltaFile
+2-6sys/dev/sound/pcm/channel.c
+4-1sys/dev/sound/pcm/buffer.c
+1-1sys/dev/sound/pcm/buffer.h
+7-83 files

FreeBSD/src 6d66485sys/dev/sound/pcm dsp.c

sound: Remove dead code in dsp_ioctl()

Sponsored by;   The FreeBSD Foundation
MFC after:      1 week

(cherry picked from commit 69c4e2b68a588272de6ab86e302d87188bfef2a6)
DeltaFile
+0-8sys/dev/sound/pcm/dsp.c
+0-81 files

FreeBSD/src f9a4dd6sys/dev/virtio virtio_config.h virtio.c

virtio: Add feature bit definitions up to VirtIO v1.3

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2319
DeltaFile
+26-2sys/dev/virtio/virtio_config.h
+8-0sys/dev/virtio/virtio.c
+34-22 files

FreeBSD/src 8bdc312sys/dev/virtio/pci virtio_pci_modern.c

virtio: Accept VIRTIO_F_RING_RESET in the modern PCI transport

Accept per-virtqueue reset when the device offers it, alongside
the V1 flag.  Negotiating the feature merely permits the use of
per-virtqueue reset and imposes no obligation on a driver that
never uses it, while refusing capability-only transport features
can make strict devices reject the feature set altogether.

No functional change on hosts that do not offer RING_RESET.

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2319
DeltaFile
+8-0sys/dev/virtio/pci/virtio_pci_modern.c
+8-01 files

FreeBSD/src 5d0488bsys/dev/virtio/pci virtio_pci_modern.c

virtio: Report feature masks on negotiation failure

Signed-off-by: Faraz Vahedi <kfv at kfv.io>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2319
DeltaFile
+4-1sys/dev/virtio/pci/virtio_pci_modern.c
+4-11 files

FreeBSD/src 3ff24c7sys/netinet in_pcb.c

inpcb: remove unneeded #ifdef INET || INET6

Per sys/conf/files this unit is not compiled for a NOIP kernel.
DeltaFile
+1-5sys/netinet/in_pcb.c
+1-51 files

FreeBSD/src e56cb0bsys/kern uipc_socket.c

sockets: inherit SO_ACCEPTFILTER from listener to child

This is crucial for operation of accept_filter(9).  See added comment.

Fixes:  d29b95ecc0d049406d27a6c11939d40a46658733
(cherry picked from commit a8acc2bf5699556946dda2a37589d3c3bd9762c6)
DeltaFile
+6-2sys/kern/uipc_socket.c
+6-21 files

FreeBSD/src 4d07fdctests/sys/netinet fibs_test.sh

fibs_test: Mark same_ip_multiple_ifaces_fib0 as expected to fail

The test relies on being able to assign the same interface address to
two different tap interfaces; it then removes one of the addresses,
which at one point would trigger a kernel panic.

Since 361a8395f0b0 it is not possible to assign an address multiple
times this way, so the test fails.  Just mark it as expected to fail for
now: if the kernel's behaviour here changes again, this test might be a
useful seatbelt.

MFC after:      2 weeks

(cherry picked from commit 6bdc9743d8f8c9727e5101d6cb6f2a85a13c5acb)
DeltaFile
+3-0tests/sys/netinet/fibs_test.sh
+3-01 files

FreeBSD/src 39e1726sys/kern uipc_accf.c, tests/sys/kern socket_accf.c

accept_filter: return different errors for non-listener and a busy socket

The fact that an accept filter needs to be cleared first before setting to
a different one isn't properly documented.  The requirement that the
socket needs already be listening, although trivial, isn't documented
either.  At least return a more meaningful error than EINVAL for an
existing filter.  Cover this with a test case.

(cherry picked from commit 19307b86d31b7dea4bb5c3f7e233ee0e59049258)
DeltaFile
+32-0tests/sys/kern/socket_accf.c
+5-1sys/kern/uipc_accf.c
+37-12 files

FreeBSD/src d73ce9dshare/man/man9 accf_tls.9 Makefile, sys/conf options

accf_tls: accept filter that waits for TLS handshake header

(cherry picked from commit c68eed82a3dcadf0c826e9e150f59769f4c44f24)
DeltaFile
+106-0sys/netinet/accf_tls.c
+95-0share/man/man9/accf_tls.9
+60-1tests/sys/kern/socket_accf.c
+7-0sys/modules/accf_tls/Makefile
+1-0sys/conf/options
+1-0share/man/man9/Makefile
+270-13 files not shown
+273-19 files

FreeBSD/src 8cd7442sys/netinet6 nd6.c in6_var.h

netinet6: Remove ndpr_raf_ra_derived flag

This flag was introduced at 8036234c72c9361711e867cc1a0c6a7fe0babd84
to prevent the SIOCSPFXFLUSH_IN6 ioctl from removing manually-added
entries.  However, this flag did actually not work due to an
incomplete implementation making prelist_update() not handle it before
calling nd6_prelist_add().

This patch removes the flag because a prefix is derived from an RA
always has an entry in the ndpr_advrtrs member in the struct
nd_prefix.  Having a separate flag is not a good idea because it can
cause a mismatch between the flag and the ndpr_advrtrs entry.  Testing
using LIST_EMPTY() is simpler for the origial goal.

This also removes in a prefix check in the ICMPV6CTL_ND6_PRLIST sysctl
to exclude manually-added entries.  This ioctl is designed to list all
entries, and there is no relationship to SIOCSPFXFLUSH_IN6.

Differential Revision:  https://reviews.freebsd.org/D46441

    [2 lines not shown]
DeltaFile
+3-5sys/netinet6/nd6.c
+1-3sys/netinet6/in6_var.h
+0-1sys/netinet6/nd6.h
+0-1sys/netinet6/nd6_rtr.c
+4-104 files

FreeBSD/src 954001asys/dev/sound/usb uaudio.c

snd_uaudio: Initialize mixer_lock with MTX_RECURSE

Fixes:          fc9dc8482396 ("snd_uaudio: Lock usbd_transfer_start() in uaudio_mixer_ctl_set()")
PR:             296682
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+8-1sys/dev/sound/usb/uaudio.c
+8-11 files