FreeBSD/src 5c4021csys/net if.c

ifnet: if_detach(): Fix races with vmove operations

The rationality is that the driver private data holds a strong reference
to the interface, and the detach operation shall never fail. Given the
vmove operation, if_vmove_loan(), if_vmove_reclaim() or vnet_if_return()
is not atomic and spans multiple steps, acquire ifnet_detach_sxlock only
for if_detach_internal() and if_vmove() is not sufficient. It is possible
that the thread running if_detach() sees stale vnet, or the vmoving is
in progress, then if_unlink_ifnet() will fail.

Fix that by extending coverage of ifnet_detach_sxlock a bit to also
cover if_unlink_ifnet(), so that the entire detach and vmove operation
is serialized.

Given it is an error when the if_unlink_ifnet() fails, and if_detach()
is a public KPI, prefer panic() over assertion on failure, to indicate
explicitly that bad thing happens. That shall also prevent potential
corrupted status of the interface, which is a bit hard to diagnose.


    [6 lines not shown]
DeltaFile
+17-6sys/net/if.c
+17-61 files

FreeBSD/src 3a4c4d6tests/sys/netgraph eiface_test.sh Makefile

tests/netgraph: Add a test for races between if_detach() and vnet_if_return()

A ng_eiface(4) or physical interface does not involve the cloner hence
the detaching is a bit different with epair(4). Add more tests to cover
that.

PR:             292993
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56609

(cherry picked from commit 0988abd52352ae0977cd3e5c10316b7d94e1cac8)
DeltaFile
+67-0tests/sys/netgraph/eiface_test.sh
+2-0tests/sys/netgraph/Makefile
+69-02 files

FreeBSD/src 696d159tests/sys/net if_clone_test.sh

tests/net/if_clone_test: Add a test for races between if_detach() and if_vmove_reclaim()

Ideally we shall have tests for all possible races. It is races between
if_detach(), if_vmove_loan(), if_vmove_reclaim() and vnet_if_return().
Well that requires too many tests and it appears to be less valuable to
have them all. So focus on potential in future regressions related to
recent fixes [1] and [2] only.

[1] ee9456ce3753 ifnet: Fix races in if_vmove_reclaim()
[2] ba7f47d47dc1 ifnet: if_detach(): Fix races with vmove operations

MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56606

(cherry picked from commit f4be16983dea4904f85ac20e921ad2a8c18a0f79)
DeltaFile
+29-0tests/sys/net/if_clone_test.sh
+29-01 files

FreeBSD/src c624e04sys/net if_clone.c if.c, sys/netlink/route iface.c

if_clone: Make ifnet_detach_sxlock opaque to consumers

The change e133271fc1b5e introduced ifnet_detach_sxlock, and change
6d2a10d96fb5 widened its coverage, but there are still consumers,
net80211 and tuntap e.g., want it. Instead of sprinkling it everywhere,
make it opaque to consumers.

Out of tree drivers shall also benefit from this change.

Reviewed by:    kp
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56298

(cherry picked from commit e9fc0c538264355bd3fd9120c650078281c2a290)
DeltaFile
+16-1sys/net/if_clone.c
+1-4sys/net/if.c
+0-3sys/netlink/route/iface.c
+17-83 files

FreeBSD/src ccfc2d9sys/net if.c

ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of ifnet_detach_sxlock

vnet_if_return() will be invocked by vnet_sysuninit() on vnet destructing,
while the lock ifnet_detach_sxlock has been acquired in vnet_destroy()
already.

With this change the order of locking is more clear. There should be no
functional change.

Reviewed by:    pouria
Fixes:          868bf82153e8 if: avoid interface destroy race
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56288

(cherry picked from commit f1fae67afbb13a41d488d0e0ec66b1805925019c)
DeltaFile
+2-2sys/net/if.c
+2-21 files

FreeBSD/src 477c3basys/net if.c

ifnet: Move SIOCSIFVNET from ifhwioctl() to ifioctl()

SIOCSIFVNET is not a hardware ioctl. Move it to where it belongs.

Where here, rewrite the logic of checking whether we are moving the
interface from and to the same vnet or not, since it is obviously not
stable to access the interface's vnet, given the current thread may
race with other threads those running if_vmove().

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55880

(cherry picked from commit 38bd7ef62f318f791e232e217855307a9d75efa0)
DeltaFile
+27-17sys/net/if.c
+27-171 files

FreeBSD/src cef2f7bsys/net if.c

ifnet: Fix races in if_vmove_reclaim()

The thread running if_vmove_reclaim() may race with other threads those
running if_detach(), if_vmove_loan() or if_vmove_reclaim(). In case the
current thread loses race, two issues arise,

 1. It is unstable and unsafe to access ifp->if_vnet,
 2. The interface is removed from "active" list, hence if_unlink_ifnet()
    can fail.

For the first case, check against source prison's vnet instead, given
the interface is obtained from that vnet.

For the second one, return ENODEV to indicate the interface was on the
list but the current thread loses race, to distinguish from ENXIO, which
means the interface or child prison is not found. This is the same with
if_vmove_loan().

Reviewed by:    kp, pouria

    [5 lines not shown]
DeltaFile
+9-5sys/net/if.c
+9-51 files

FreeBSD/src a989b0fsys/net if.c

ifnet: Remove unreachable code

The ioctls SIOCSIFVNET and SIOCSIFRVNET are for userland only. For
SIOCSIFVNET, if_vmove_loan(), the interface is obtained from current
VNET. For SIOCSIFRVNET, if_vmove_reclaim(), a valid child prison is
held before getting the interface. In both cases the VNET of the
obtained interfaces is stable, so there's no need to check it.

No functional change intended.

Reviewed by:    glebius, jamie (for #jails)
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55828

(cherry picked from commit e0731059af912a27d0f842959218946b1daaa7d1)
DeltaFile
+0-18sys/net/if.c
+0-181 files

FreeBSD/src 877fa4fsys/net if.c

ifnet: Add some sanity checks

To be more robust since the checking is now performed where the
interface is referenced.

While here, remove a redundant check from if_vmove_loan().

Reviewed by:    kp, glebius, pouria
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D55875

(cherry picked from commit 00d96da231d007673a1672452748d8ea4f6788ae)
DeltaFile
+19-10sys/net/if.c
+19-101 files

FreeBSD/src 226b37dsys/dev/ichsmb ichsmb_pci.c ichsmb.c

dev/ichsmb: disable block buffer if supported

In order to improve the efficiency of block read/write calls, Intel has
introduced a block buffer. Instead of generating an interrupt after
receiving/sending a single byte, the data is buffered in the block buffer. It
allows the SMBus controller to generate a single interrupt for the whole
transfer. At the moment, we don't support that and don't expect the SMBus
controller to behave in that way. Unfortunately, BIOS code can also access the
SMBus controller and may enable the block buffer. Poorly written BIOS code may
also keep the block buffer enabled breaking our driver. Therefore, we should
check if the device supports a block buffer and disable it for every request
because we don't know if some BIOS code has reconfigured the SMBus controller
in between.

Reviewed by:            emaste
MFC after:              1 week
Sponsored by:           Beckhoff Automation GmbH & Co. KG
Pull Request:           https://github.com/freebsd/freebsd-src/pull/2161
DeltaFile
+54-0sys/dev/ichsmb/ichsmb_pci.c
+18-0sys/dev/ichsmb/ichsmb.c
+3-0sys/dev/ichsmb/ichsmb_var.h
+3-0sys/dev/ichsmb/ichsmb_reg.h
+78-04 files

FreeBSD/src 7590908usr.sbin/bhyve tpm_intf_crb.c

bhyve: allow read/write to full CRB buffer

For some reason, we've incorrectly calculated the size of the CRB data buffer
register. There's no need to divide the CRB data buffer size by 4. We should
allow access to the whole buffer instead.

Reviewed by:            markj
MFC after:              1 week
Sponsored by:           Beckhoff Automation GmbH & Co. KG
Pull Request:           https://github.com/freebsd/freebsd-src/pull/2169
DeltaFile
+1-1usr.sbin/bhyve/tpm_intf_crb.c
+1-11 files

FreeBSD/ports e1202f0Mk/Uses mlt.mk, multimedia/mlt7 pkg-plist Makefile

multimedia/mlt7*: Update to 7.38.0

Release notes: https://github.com/mltframework/mlt/releases/tag/v7.38.0

multimedia/mlt7:
 - Add OPENFX option

PR:             294868
DeltaFile
+12-0multimedia/mlt7/pkg-plist
+5-2multimedia/mlt7/Makefile
+3-3multimedia/mlt7/distinfo
+1-1Mk/Uses/mlt.mk
+1-0multimedia/mlt7-qt/pkg-plist
+22-65 files

FreeBSD/ports d10472cnet/lldap Makefile, net/lldap/files patch-app_src_components_login.rs

net/lldap: Backport commit ac55dfedc44f

As per request, we add this commit

PR:     292254
Sponsored by:   The FreeBSD Foundation
DeltaFile
+11-0net/lldap/files/patch-app_src_components_login.rs
+1-1net/lldap/Makefile
+12-12 files

FreeBSD/ports e658605sysutils/epazote distinfo Makefile.crates

sysutils/epazote: Update to 3.4.0

PR:             294889
Approved by:    nbari at tequila.io (maintainer)
DeltaFile
+719-7sysutils/epazote/distinfo
+358-0sysutils/epazote/Makefile.crates
+4-10sysutils/epazote/Makefile
+1,081-173 files

FreeBSD/ports 25d1aebdatabases/rqlite distinfo Makefile

databases/rqlite: update 10.0.0 → 10.0.1
DeltaFile
+5-5databases/rqlite/distinfo
+2-2databases/rqlite/Makefile
+7-72 files

FreeBSD/ports 40da972multimedia/kew distinfo Makefile

multimedia/kew: update 3.7.3 → 4.0.0
DeltaFile
+3-3multimedia/kew/distinfo
+1-1multimedia/kew/Makefile
+4-42 files

FreeBSD/ports afc4c20devel/buf distinfo Makefile

devel/buf: update 1.68.4 → 1.69.0
DeltaFile
+5-5devel/buf/distinfo
+1-1devel/buf/Makefile
+6-62 files

FreeBSD/ports 3f8aa9edevel/bear distinfo Makefile.crates, devel/bear/files patch-bear_build.rs

devel/bear: Upgrade to 4.1.2

ChangeLog:
https://github.com/rizsotto/Bear/releases/tag/4.1.2

Reviewed by:    lwhsu
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56690
DeltaFile
+193-91devel/bear/distinfo
+96-45devel/bear/Makefile.crates
+0-21devel/bear/files/patch-bear_build.rs
+5-9devel/bear/Makefile
+9-3devel/bear/pkg-plist
+303-1695 files

FreeBSD/ports 4ca876ftextproc/moor distinfo Makefile

textproc/moor: Update 2.12.0 => 2.12.2

Changelogs:
- https://github.com/walles/moor/releases/tag/v2.12.1
- https://github.com/walles/moor/releases/tag/v2.12.2

Reviewed by:    osa, vvd (mentors)
Approved by:    vvd (co-mentor)
Differential Revision: https://reviews.freebsd.org/D56720
DeltaFile
+5-5textproc/moor/distinfo
+1-2textproc/moor/Makefile
+6-72 files

FreeBSD/ports 557e5badevel/capnproto Makefile

devel/capnproto: reset maintainer

Remove Felix as maitainer of devel/capnproto at his request:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294259#c18
DeltaFile
+1-1devel/capnproto/Makefile
+1-11 files

FreeBSD/ports b9d3f4adeskutils/nextcloudclient distinfo Makefile

deskutils/nextcloudclient: Update to 33.0.3
DeltaFile
+3-3deskutils/nextcloudclient/distinfo
+1-5deskutils/nextcloudclient/Makefile
+1-0deskutils/nextcloudclient/pkg-plist
+5-83 files

FreeBSD/ports 58f7ad8net-mgmt/netbox Makefile distinfo

net-mgmt/netbox: Update to 4.5.9

Changelog:

Enhancements:
* Add profile filter support for modules
* Enable optional config template selection when rendering device
  configuration via a URL query parameter
* Support filtering by multiple object-type custom fields simultaneously
  in filter forms
* Include the PostgreSQL database schema in system details
* Allow dict subclasses for the API_TOKEN_PEPPERS configuration
  parameter

Performance Improvements:
* Optimize queryset prefetching for CSV bulk export

Bug Fixes:
* Fix incorrect contact count for contact groups with contacts assigned

    [25 lines not shown]
DeltaFile
+9-9net-mgmt/netbox/Makefile
+3-3net-mgmt/netbox/distinfo
+3-0net-mgmt/netbox/pkg-plist
+15-123 files

FreeBSD/ports 01f61b3www/py-nh3 distinfo Makefile.crates

www/py-nh3: Update to 0.3.5

Changelog:

https://github.com/messense/nh3/releases/tag/v0.3.5

MFH:            2026Q2
(cherry picked from commit a1e6425c92217b8355c1fedb2653f1f63d28cbe2)
DeltaFile
+59-59www/py-nh3/distinfo
+28-28www/py-nh3/Makefile.crates
+1-1www/py-nh3/Makefile
+88-883 files

FreeBSD/src 65d7503sys/dev/ahci ahci_pci.c

ahci(4): Add another device ID for Marvell 9128 SATA controller: 0x91a3

This was encountered on a Gigabyte GA-P55A-UD4 motherboard identifying itself
as:
ahci0 at pci0:2:0:0:       class=0x01018f rev=0x11 hdr=0x00 vendor=0x1b4b device=0x91a3 subvendor=0x1458 subdevice=0xb000
    vendor     = 'Marvell Technology Group Ltd.'
    class      = mass storage
    subclass   = ATA

The physical chip has "88SE9128-NAA2" printed on it.

Similar code has been in Linux for a long time:
https://github.com/torvalds/linux/commit/50be5e3657cd2851a297dc0b3fd459f25829d29b

Co-authored-by: Michael Osipov <michaelo at FreeBSD.org>
PR:             288526
Reviewed by:    jhb
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56464

    [2 lines not shown]
DeltaFile
+2-0sys/dev/ahci/ahci_pci.c
+2-01 files

FreeBSD/ports aa0798dwww/py-dj52-drf-spectacular-sidecar distinfo Makefile

www/py-dj52-drf-spectacular-sidecar: Update to 2026.4.14

Changelog:

https://github.com/tfranzel/drf-spectacular-sidecar/compare/2026.4.1...2026.4.14

MFH:            2026Q2
(cherry picked from commit 4a51b0ec0454d7eaec0b5f6de94db4cedc6b8c7a)
DeltaFile
+3-3www/py-dj52-drf-spectacular-sidecar/distinfo
+1-1www/py-dj52-drf-spectacular-sidecar/Makefile
+4-42 files

FreeBSD/ports e5c7efewww/py-dj52-social-auth-app-django distinfo Makefile

www/py-dj52-social-auth-app-django: Update to 5.8.0

Changelog:

https://github.com/python-social-auth/social-app-django/releases/tag/5.8.0

MFH:            2026Q2
(cherry picked from commit 3eb77bbf122fddf54233f2f3bd9656e8fe760dc5)
DeltaFile
+3-3www/py-dj52-social-auth-app-django/distinfo
+1-1www/py-dj52-social-auth-app-django/Makefile
+4-42 files

FreeBSD/ports 7952ff1textproc/py-mkdocstrings distinfo Makefile

textproc/py-mkdocstrings: Update to 1.0.4

Changelog:

https://github.com/mkdocstrings/mkdocstrings/releases/tag/1.0.4

MFH:            2026Q2
(cherry picked from commit a63e3f57309f65f37fd55cd752bba47ab4a6aad7)
DeltaFile
+3-3textproc/py-mkdocstrings/distinfo
+1-1textproc/py-mkdocstrings/Makefile
+4-42 files

FreeBSD/ports 16a971bdevel/py-rq distinfo Makefile

devel/py-rq: Update to 2.8.0

Changelog:

https://github.com/rq/rq/releases/tag/v2.8

Approved by:    skreuzer (maintainer, implicit)
MFH:            2026Q2

(cherry picked from commit 3613be871119d6da840c35b85dc979ee8a0c42c9)
DeltaFile
+3-3devel/py-rq/distinfo
+1-1devel/py-rq/Makefile
+4-42 files

FreeBSD/ports bba36badevel/py-dj52-strawberry-graphql distinfo Makefile

devel/py-dj52-strawberry-graphql: Update to 0.315.2

Changelog since 0.314.3:

https://github.com/strawberry-graphql/strawberry/blob/0.315.2/CHANGELOG.md

MFH:            2026Q2
(cherry picked from commit 51a95ce7ba3546c8fd680decd576a69ffb963968)
DeltaFile
+3-3devel/py-dj52-strawberry-graphql/distinfo
+1-1devel/py-dj52-strawberry-graphql/Makefile
+4-42 files

FreeBSD/ports 3d55691devel/py-dj52-django-rq distinfo Makefile

devel/py-dj52-django-rq: Update to 4.1.0

Changes:        https://github.com/rq/django-rq/releases
(cherry picked from commit 1323f87e4a71dfc5cb8a098a39286a6e96c72c5b)
DeltaFile
+3-3devel/py-dj52-django-rq/distinfo
+1-1devel/py-dj52-django-rq/Makefile
+4-42 files