FreeBSD/src 44d6df4sys/dev/nvme nvme.h

nvme: Use memcpy instead of memmove in nvme_cdata_get_disk_ident

These buffers should not overlap.

Reviewed by:    imp
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D53842
DeltaFile
+1-1sys/dev/nvme/nvme.h
+1-11 files

FreeBSD/src ef55f6bcontrib/sqlite3 sqlite3.c sqlite3.h

sqlite3: Update to 3.50.4

Release notes at https://www.sqlite.org/releaselog/3_50_4.html.

Obtained from:  https://www.sqlite.org/2025/sqlite-autoconf-3500400.tar.gz

Merge commit 'e7e917ee3cf2b3010b1c511c6ebaf8b65b983ad7'

(cherry picked from commit 07d5a9b1b2dd95d95137c6c2afcb84ad40c05b75)
DeltaFile
+122-81contrib/sqlite3/sqlite3.c
+45-45contrib/sqlite3/sqlite3.h
+1-1contrib/sqlite3/VERSION
+1-1contrib/sqlite3/sqlite3.pc.in
+1-1contrib/sqlite3/sqlite3rc.h
+170-1295 files

FreeBSD/src c7cfc16libexec/rc/rc.d ippool

ipfilter: Load optionlist prior to ippool invocation

As a safety precaution df381bec2d2b limits ippool hash table size to 1K.
This causes any legitimely large hash table to fail to load. The
htable_size_max ipf tuneable adjusts this but the adjustment is made
in the ipfilter rc script, invoked after the ippool script (because it
depends on ippool). Let's load the ipfilter_optionlist in ippool as well.
ipfilter_optionlist load will also occur in the ipfilter rc script in case
the user uses ipfilter without ippool.

Fixes:          df381bec2d2b

(cherry picked from commit d5d005e9bf4933d5680dd0bb5d42bdf440122aa4)
DeltaFile
+3-0libexec/rc/rc.d/ippool
+3-01 files

FreeBSD/src 38eec1flibexec/rc/rc.d ippool

ipfilter: Load optionlist prior to ippool invocation

As a safety precaution df381bec2d2b limits ippool hash table size to 1K.
This causes any legitimely large hash table to fail to load. The
htable_size_max ipf tuneable adjusts this but the adjustment is made
in the ipfilter rc script, invoked after the ippool script (because it
depends on ippool). Let's load the ipfilter_optionlist in ippool as well.
ipfilter_optionlist load will also occur in the ipfilter rc script in case
the user uses ipfilter without ippool.

Fixes:          df381bec2d2b

(cherry picked from commit d5d005e9bf4933d5680dd0bb5d42bdf440122aa4)
DeltaFile
+3-0libexec/rc/rc.d/ippool
+3-01 files

FreeBSD/src d712976libexec/rc/rc.d ippool

ipfilter: Load optionlist prior to ippool invocation

As a safety precaution df381bec2d2b limits ippool hash table size to 1K.
This causes any legitimely large hash table to fail to load. The
htable_size_max ipf tuneable adjusts this but the adjustment is made
in the ipfilter rc script, invoked after the ippool script (because it
depends on ippool). Let's load the ipfilter_optionlist in ippool as well.
ipfilter_optionlist load will also occur in the ipfilter rc script in case
the user uses ipfilter without ippool.

Fixes:          df381bec2d2b
(cherry picked from commit d5d005e9bf4933d5680dd0bb5d42bdf440122aa4)
DeltaFile
+3-0libexec/rc/rc.d/ippool
+3-01 files

FreeBSD/src 07d5a9bcontrib/sqlite3 sqlite3.c sqlite3.h

sqlite3: Update to 3.50.4

Release notes at https://www.sqlite.org/releaselog/3_50_4.html.

Obtained from:  https://www.sqlite.org/2025/sqlite-autoconf-3500400.tar.gz

Merge commit 'e7e917ee3cf2b3010b1c511c6ebaf8b65b983ad7'
DeltaFile
+122-81contrib/sqlite3/sqlite3.c
+45-45contrib/sqlite3/sqlite3.h
+1-1contrib/sqlite3/VERSION
+1-1contrib/sqlite3/sqlite3.pc.in
+1-1contrib/sqlite3/sqlite3rc.h
+170-1295 files

FreeBSD/src e7e917e. sqlite3.c sqlite3.h

sqlite3: Vendor import of sqlite3 3.50.4

Release notes at https://www.sqlite.org/releaselog/3_50_4.html.

Obtained from:  https://www.sqlite.org/2025/sqlite-autoconf-3500400.tar.gz
DeltaFile
+122-81sqlite3.c
+45-45sqlite3.h
+1-1VERSION
+1-1sqlite3.pc.in
+1-1sqlite3rc.h
+170-1295 files

FreeBSD/src 1630af4sys/amd64/include vmm.h, sys/amd64/vmm vmm.c vmm_dev.c

vmm: Fix a deadlock between vm_smp_rendezvous() and vcpu_lock_all()

vm_smp_rendezvous() invokes a callback on all vCPUs, blocking the
initiator until all vCPUs have responded.  vcpu_lock_all() blocks each
vCPU by waiting for it to go idle and setting the vCPU state to frozen.
These two operations can deadlock on each other, particularly when
booting a Windows guest, when vcpu_lock_all() blocks waiting for a
rendezvous initiator, and the initiator is blocked waiting for the vCPU
thread which called vcpu_lock_all() to invoke the rendezvous callback.

Implement vcpu_lock_all() in a way that avoids deadlocks with
vm_smp_rendezvous().  In particular, when traversing vCPUs, invoke the
rendezvous callback on the vCPU's behalf to help the initiator finish.
We can only safely do so when the vCPU is IDLE or we have already locked
it, otherwise we may be racing with the target vCPU thread.  Thus:
- Use an exclusive lock to serialize vcpu_lock_all() callers, which lets
  us lock vCPUs out of order without fear of deadlock with parallel
  vcpu_lock_all() callers.
- If a rendezvous is pending, lock all idle vCPUs and invoke the

    [16 lines not shown]
DeltaFile
+148-29sys/amd64/vmm/vmm.c
+7-23sys/amd64/vmm/vmm_dev.c
+2-1sys/amd64/include/vmm.h
+157-533 files

FreeBSD/src f417c9esys/powerpc/include _stdint.h

powerpc/_stdint.h: fix SIG_ATOMIC_{MIN,MAX,WIDTH}

On powerpc/powerpc64, sig_atomic_t is an int, but was treated as if
it was a long by <machine/_stdint.h>.  This was finally caught by the
unit test added with 4a1c752 / D53831.

Reported by:    kib
Reviewed by:    kib, imp
Approved by:    markj (mentor)
Fixes:          c3e289e1ce8c9af8d14e9f727632e22b3bf901f9
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54026
DeltaFile
+5-10sys/powerpc/include/_stdint.h
+5-101 files

FreeBSD/src babb41asys/dev/nvme nvme.h

nvme: Minor style nit

Sponsored by:           Netflix
DeltaFile
+1-2sys/dev/nvme/nvme.h
+1-21 files

FreeBSD/src 7b44ab1share/misc bsd-family-tree

bsd-family-tree: add FreeBSD 15.0
DeltaFile
+4-1share/misc/bsd-family-tree
+4-11 files

FreeBSD/src 7295aealib/libuvmem libuvmem.3 Makefile

libuvmem: provide man page mostly as a pointer to vmem(9)

Reviewed by:    bnovkov, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D27220
DeltaFile
+71-0lib/libuvmem/libuvmem.3
+2-0lib/libuvmem/Makefile
+73-02 files

FreeBSD/src 1ecf010lib/libuvmem Makefile Symbol.map, share/mk src.libnames.mk

libuvmem: usermode port of vmem(9)

The quantum cache is disabled, there is no uma.

Intent is to use this for resource allocation in bhyve(8), for start.
Addition of -luvmem to bhyve linking was done to test changes to share/mk.

Reviewed by:    bnovkov, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D27220
DeltaFile
+137-14sys/kern/subr_vmem.c
+15-8sys/sys/vmem.h
+17-0lib/libuvmem/Makefile
+15-0lib/libuvmem/Symbol.map
+5-0share/mk/src.libnames.mk
+2-0sys/contrib/openzfs/include/sys/zfs_context.h
+191-223 files not shown
+194-239 files

FreeBSD/src 202292esys/kern subr_vmem.c

kern/subr_vmem.c: convert explicit vmem_list_lock use to macros

Reviewed by:    bnovkov, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D27220
DeltaFile
+9-6sys/kern/subr_vmem.c
+9-61 files

FreeBSD/src 305e33dsys/kern subr_vmem.c

kern/subr_vmem.c: remove unused VMEM_TRYLOCK() macro

Reviewed by:    bnovkov, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D27220
DeltaFile
+0-1sys/kern/subr_vmem.c
+0-11 files

FreeBSD/src c6fe17aetc/mtree BSD.lib32.dist BSD.usr.dist

mtree: Keep mtree files indented with spaces

The mtree tool indents directory entries with 4 spaces.

Reviewed by:    imp
Fixes:          9cab9fde5eda ("virtual_oss: Port to base")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53979

(cherry picked from commit 3d91a746380e81c2089d8beaae28438867ae6dbf)
DeltaFile
+2-2etc/mtree/BSD.lib32.dist
+2-2etc/mtree/BSD.usr.dist
+4-42 files

FreeBSD/src 791c531share/man/man4 ufintek.4, sys/dev/usb/serial ufintek.c

Fintek F81232 USB to serial driver

Driver for Feature Integration Technology Inc. (aka Fintek)
F81232 USB to serial driver.

Reviewed by:    thj,adrian,UB
Approved by:    adrian
Differential Revision:  https://reviews.freebsd.org/D53893
DeltaFile
+759-0sys/dev/usb/serial/ufintek.c
+118-0share/man/man4/ufintek.4
+37-0sys/modules/ufintek/Makefile
+914-03 files

FreeBSD/src 639e651sys/netpfil/pf if_pfsync.c

pfsync: fix incorrect unlock during destroy

During pfsync_clone_destroy() we clean up pending packets. This
may involve calling pfsync_undefer() or callout_drain(). We may not
hold the bucket lock during callout_drain(), but must hold it during
pfsync_undefer().

We incorrectly always released the lock, leading to assertion failures
during cleanup if there were pending deferred packets.

MFC after:      1 week
Sponsored by:   Orange Business Services
DeltaFile
+2-2sys/netpfil/pf/if_pfsync.c
+2-21 files

FreeBSD/src 7a283c4sbin/pfctl pfctl.c, tests/sys/netpfil/pf table.sh

pfctl: restore '-Tload -f pf.conf' functionality

Allow only tables to be loaded from a file, rather than everything (i.e.
including options, rules).

Add a test case for this.

PR:             291318
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+35-0tests/sys/netpfil/pf/table.sh
+2-1sbin/pfctl/pfctl.c
+37-12 files

FreeBSD/src d6f1acfsys/netpfil/pf pf.c

pf: use correct sized variables in pf_change_icmp()

We're updating 16-bits checksums here, so should use a 16-bit integer,
not a 32-bit one.
No functional change.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-2sys/netpfil/pf/pf.c
+2-21 files

FreeBSD/src dc6f609usr.sbin/moused/msconvd msconvd.8

msconvd(8): Drop mentions of Bus/InPort mouse support in manual page

mse(4) was removed long ago.

MFC after:      1 month
DeltaFile
+2-19usr.sbin/moused/msconvd/msconvd.8
+2-191 files

FreeBSD/src 732b4aacddl/contrib/opensolaris/tools/ctf/cvt barrier.c barrier.h

ctfmerge: fix segfault when building on macOS

The barrier code was using semaphores which have been deprecated in
macOS and not working at all, causing a race condition. Since macOS
does not have pthread_barrier_*(), this change uses a condition
variable instead.

PR:             290958
Reported by:    wosch
MFC after:      2 weeks
Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D54018
DeltaFile
+3-23cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c
+2-7cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h
+5-302 files

FreeBSD/src e3201cesys/dev/atkbdc psm.c

psm: Fix three finger tap on elantech v4 touchpads

Fix an issue where a three finger tap would generate additional events
when fingers moved slightly during the tap.

Signed-off-by:  Robert Wahlberg <freebsd at robertwahlberg.se>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1792
Reviewed by:    wulf
MFC after:      1 month
DeltaFile
+7-0sys/dev/atkbdc/psm.c
+7-01 files

FreeBSD/src 8d9a5d4sys/dev/evdev input.h input-event-codes.h

evdev: Sync event codes with Linux kernel 6.18

MFC after:      1 month
DeltaFile
+44-29sys/dev/evdev/input.h
+27-1sys/dev/evdev/input-event-codes.h
+71-302 files

FreeBSD/src b6cad33share/man/man4 hgame.4 ps4dshock.4, sys/dev/hid ps4dshock.c hgame.c

hid: Make game controllers accessible to members of the game group

Their events have to be accessible by unprivileged users via e.g. libsdl.

MFC after:      1 month
DeltaFile
+8-1sys/dev/hid/ps4dshock.c
+4-3share/man/man4/hgame.4
+6-1sys/dev/hid/hgame.c
+4-1share/man/man4/ps4dshock.4
+4-1share/man/man4/xb360gp.4
+26-75 files

FreeBSD/src ecccc9dsys/dev/evdev evdev.c cdev.c

evdev: Allow setting of character device ownership and access mode

by device driver. That is required as game pad and joystick events have
to be accessible by ordinary users.

MFC after:      1 month
DeltaFile
+16-1sys/dev/evdev/evdev.c
+3-3sys/dev/evdev/cdev.c
+3-0sys/dev/evdev/evdev_private.h
+1-0sys/dev/evdev/evdev.h
+23-44 files

FreeBSD/src 882821bsys/kern kern_kexec.c

kexec: Change shutdown handler priority

The kexec shutdown handler should run after everything else, but before
the other platform shutdown handlers.  With (SHUTDOWN_PRI_DEFAULT - 150)
priority it would run before anything else, including all the device
shutdown handlers.  Change to (SHUTDOWN_PRI_LAST - 150) where it
belongs.

Sponsored by:   Hewlett Packard Enterprise
DeltaFile
+1-1sys/kern/kern_kexec.c
+1-11 files

FreeBSD/src f15e549sys/kern uipc_mqueue.c uipc_usrreq.c, sys/sys protosw.h mqueue.h

file: Add a fdclose method

Consider a program that creates a unix socket pair, transmits both
sockets from one to the other using an SCM_RIGHTS message, and then
closes both sockets without externalizing the message.  unp_gc() is
supposed to handle cleanup, but it is only triggered by uipc_detach(),
which runs when a unix socket is destroyed.  Because the two sockets are
internalized, their refcounts are positive, so uipc_detach() isn't
called.

As a result, a userspace program can create an unbounded amount of
garbage without triggering reclaim.  Let's trigger garbage collection
whenever a unix socket is close()d.  To implement this, add new a
fdclose file op and protocol op, and implement them accordingly.  Since
mqueuefs has a hack to hook into the file close path, convert it to use
the new op as well.

Now, userspace can't create garbage without triggering reclamation.


    [5 lines not shown]
DeltaFile
+28-31sys/kern/uipc_mqueue.c
+23-4sys/kern/uipc_usrreq.c
+12-0sys/kern/sys_socket.c
+2-6sys/kern/kern_descrip.c
+5-2sys/sys/protosw.h
+0-5sys/sys/mqueue.h
+70-482 files not shown
+74-498 files

FreeBSD/src f817011sys/netgraph ng_device.c

ng_device.c: improve compliance with style(9)

Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>
Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1827

(cherry picked from commit bcdbeaeffccb65574ac06001888840d9a15f4edf)
DeltaFile
+34-29sys/netgraph/ng_device.c
+34-291 files

FreeBSD/src 57e4e7dsys/netgraph ng_device.c

ng_device: enable setting the device to non-blocking mode

Return success when FIONBIO or FIOASYNC ioctl are received in order to support
being set to non-blocking through fcntl(2). We return an error on FIOASYNC with
non-zero data argument since we do not support O_ASYNC.

Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>
Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1827

(cherry picked from commit 9fadaee7ecce02ab11cfbb18ea63b9bf1fb11bfc)
DeltaFile
+34-7sys/netgraph/ng_device.c
+34-71 files