FreeBSD/src 9dfaf1cusr.sbin/pkg pkg.c pkg.7

Revert "pkg: Add -j and -r options"

This reverts commit d94e034d504682be56fc2e9d20ac2c0fe15b70ec at the
request of des@, as it seems to have broken the pass-through case.
DeltaFile
+25-91usr.sbin/pkg/pkg.c
+5-23usr.sbin/pkg/pkg.7
+1-1usr.sbin/pkg/Makefile
+31-1153 files

FreeBSD/src c4b0b13usr.sbin/bsdinstall/scripts netconfig

bsdinstall/netconfig: use a better heuristic for wlan dev desc

For devices like the rtw88, they will show up in `ifconfig -l` as
rtw880, rtw881, etc. We want to query the rtw88.0 and rtw88.1 sysctl
respectively, not rtw.880.

Chances are that there aren't more than 9 wlan devices using the same
driver. Use a better heuristic to get the device description.

Reviewed by:    bz
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-1usr.sbin/bsdinstall/scripts/netconfig
+1-11 files

FreeBSD/src 7b4bad2sys/net if_ovpn.c

if_ovpn: Fix memory leak in VNET during unload

Unloading if_ovpn while it's in use by other vnets causes
memory leaks and panics.
Fix this by reverting VNET_SYSUNINIT and adjusting the SI_SUB
initialization order.

Reviewed by:    markj
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D54175

(cherry picked from commit bf142ea4760bd4391092d9cc0038a0870cf7e0b2)
DeltaFile
+12-8sys/net/if_ovpn.c
+12-81 files

FreeBSD/src 878bf20. .git-blame-ignore-revs

Ignore the white-space-only change for decompress.c

Sponsored by:           Netflix
DeltaFile
+2-0.git-blame-ignore-revs
+2-01 files

FreeBSD/src e49fc64stand/efi/loader decompress.c

loader: Fix indentation mistakes

Somehow, I wound up with space indents rather than tab indents, so fix
this.

Sponsored by:           Netflix
DeltaFile
+45-45stand/efi/loader/decompress.c
+45-451 files

FreeBSD/src 1b5ec2etests/sys/kern subr_physmem_test.c

subr_physmem_test: add tests for two edge-cases

Help validate my assertion that "physmem will never report empty
ranges". Part of this is covered by the existing tests, which check the
merging of adjacent/overlapping regions. The other part is to ensure
that addition of zero-sized ranges is ignored.

The physmem implementation also includes logic to ignore the first
physical page of memory (physical addresses 0 to PAGE_SIZE-1). Add a
second test case for this.

Reviewed by:    markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D45914
DeltaFile
+43-0tests/sys/kern/subr_physmem_test.c
+43-01 files

FreeBSD/src 185039dsys/geom/eli g_eli.c

g_eli: disambiguate CPU-bound worker creation

This makes an effort to clarify and correct the intent of the code,
which is to either:

 1. Create one software crypto worker thread for each CPU, to be pinned
    later
 2. Create the number of threads requested by the kern.geom.eli.threads
    tunable

This is as described in geli(8).

If a CPU were somehow* absent, it should be skipped, but not in the
second case when creating a set number of threads.

To achieve this cleanly and correctly:
 - split worker creation logic into a helper function
 - keep the loops separate
 - debug message for absent CPUs is dropped

    [15 lines not shown]
DeltaFile
+72-42sys/geom/eli/g_eli.c
+72-421 files

FreeBSD/src 01f165csys/kern sched_4bsd.c sched_ule.c, sys/sys sched.h

sched/lapic: remove sched_do_timer_accounting()

The check is always true, especially after the removal of hlt_cpus_mask
from sched_4bsd.

Reviewed by:    olce, kib
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58159
DeltaFile
+0-7sys/kern/sched_4bsd.c
+0-7sys/kern/sched_ule.c
+0-3sys/sys/sched.h
+0-3sys/x86/x86/local_apic.c
+0-1sys/kern/sched_shim.c
+0-215 files

FreeBSD/src df0aca0sys/dev/hwt hwt_vm.c hwt_ioctl.c, sys/kern sched_4bsd.c kern_pmc.c

smp: remove unused hlt_cpus_mask

It is a relic, apparently once populated by a machdep.hlt_cpus sysctl.
The sysctl was removed, and ULE has never honored this mask. It is now
safe to remove.

Remove the mask, and its few remaining references in: sched_4bsd(4),
hwpmc(4), and hwt(4).

Reviewed by:    olce, kib
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58158
DeltaFile
+0-17sys/kern/sched_4bsd.c
+0-6sys/dev/hwt/hwt_vm.c
+0-5sys/dev/hwt/hwt_ioctl.c
+1-2sys/kern/kern_pmc.c
+0-1sys/kern/subr_smp.c
+0-1sys/sys/smp.h
+1-326 files

FreeBSD/src 63d4f04sys/geom/eli g_eli.c

g_eli: better handling of absent/disabled CPUs

Checking hlt_cpus_mask is a no-op, and the mask will be removed in the
next commit. However, we can use the more recent CPU_ABSENT() macro to
check the status.

Reviewed by:    olce
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58157
DeltaFile
+1-11sys/geom/eli/g_eli.c
+1-111 files

FreeBSD/src 575529ausr.sbin/bhyve pci_nvme.c

bhyve: unsigned <= 0

illumos smatch build is complaining:
    pci_nvme_parse_config() warn: 'sc->max_qentries' unsigned <= 0
    pci_nvme_parse_config() warn: 'sc->ioslots' unsigned <= 0

Because we are using atoi() to translate string to int, we need
to use int type variable for translation.

Reviewed by:    bnovkov
Differential Revision:  https://reviews.freebsd.org/D58213
DeltaFile
+9-7usr.sbin/bhyve/pci_nvme.c
+9-71 files

FreeBSD/src 8ffb400sys/arm64/rockchip rk_gpio.c

rk_gpio: defer level-IRQ EOI until source line is driven low

The previous PIC bring-up (ccda002ca10) added pic_disable_intr,
pic_enable_intr, pic_pre_ithread, and pic_post_ithread, but omitted
pic_post_filter.  Per the PIC contract pic_post_filter is non-optional;
a follow-up enforcement pass is planned that will panic() if any of the
three (pic_pre_ithread, pic_post_ithread, pic_post_filter) is missing.

This patch also fixes the EOI ordering for level-triggered IRQs (raised
by mhorne in the v1 review).  Writing PORTA_EOI before intr_isrc_dispatch
is correct for edge pins, but wrong for level pins: the source device
has not yet deasserted the line, so the latch immediately re-arms and
the controller storms.

  - rk_gpio_intr: EOI edge pins per-pin before dispatch (matches the
    pre-patch behavior for the common case); for level pins defer EOI
    to the post-dispatch path.  Stray (no consumer) level pins still
    get EOI'd here because no consumer will run to clear the source.
  - rk_pic_post_filter: new method, EOI level pins after the filter

    [16 lines not shown]
DeltaFile
+54-3sys/arm64/rockchip/rk_gpio.c
+54-31 files

FreeBSD/src d94e034usr.sbin/pkg pkg.c pkg.7

pkg: Add -j and -r options

This allows pkg(7) to be used to bootstrap a jail or chroot, and to
recognize the -j and -r options and pass them through to pkg(8) if
already bootstrapped.

Note that this does not address the issue of repository keys.  If using
a signed package repository, you will still need to copy /usr/share/keys
into the target environment before or after bootstrapping, or pkg will
be unable to verify package signatures.

MFC after:      1 week
Reviewed by:    imp, bapt
Differential Revision:  https://reviews.freebsd.org/D58165
DeltaFile
+93-27usr.sbin/pkg/pkg.c
+23-5usr.sbin/pkg/pkg.7
+1-1usr.sbin/pkg/Makefile
+117-333 files

FreeBSD/src ec17c24sys/modules/mt76 Makefile.inc, sys/modules/mt76/core Makefile

mt76: further adjust debugfs compile time options

The debugfs options between the various modules (core and chipsets)
are not 100% de-coupled.  This means we may run into unresolveable
symbols at load time of the modules if we enable certain options
generally or for core but not for the chipset.
For now: always build the core module with debugfs support.
Migrate the CONFIG_MAC80211_DEBUGFS flag into the Makefile of each
chipset so we can individually turn it on.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+0-5sys/modules/mt76/Makefile.inc
+3-0sys/modules/mt76/core/Makefile
+1-0sys/modules/mt76/mt7915/Makefile
+1-0sys/modules/mt76/mt7921/Makefile
+1-0sys/modules/mt76/mt7925/Makefile
+1-0sys/modules/mt76/mt7996/Makefile
+7-51 files not shown
+8-57 files

FreeBSD/src c6e70c6sys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: lkpi_80211_txq_tx_one() only pass sta if added to drv

If we are doing a direct (*tx) downcall, only pass sta as meta data
if it was added to the driver (via the state machine).  This prevents
us passing a sta not known to the driver leading to possible follow-up
complications/errors.  This will usually happen if (a) we are doing
software scanning, or (b) if net80211 decides to change the ni from
under us and sends a packet with the new ni.

Adjust a debug statement before to also have the added_to_drv field
in it to ease debugging.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+6-5sys/compat/linuxkpi/common/src/linux_80211.c
+6-51 files

FreeBSD/src f9a3706sys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: fix lkpi_pci_get_device() reference counting on device

In case we are passed an "odev" (a device to start the search from),
that device would have an extra reference.  The best way to illustrate
this is to look at for_each_pci_dev(), which will return one device
after the other.  Upon first return we return a pdev with a reference.
That pdev is then passed in as odev on the next call.  If we do not
clear the reference it will be leaked.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Fixes:          910cf345d0ee9 ("LinuxKPI: pci: implement ...")
Reviewed by:    dumbbell, emaste
Differential Revision: https://reviews.freebsd.org/D57428
DeltaFile
+3-1sys/compat/linuxkpi/common/src/linux_pci.c
+3-11 files

FreeBSD/src 66b25ddsys/compat/linuxkpi/common/src linux_pci.c

LinuxKPI: pci detach: implement a proper detach (release) path

There are two paths in the LinuxKPI PCI code to instantiate a "pdev"
(LinuxKPI pci_dev).  One is using the FreeBSD bus framework and the
pdev will be the softc.
This commit starts cleaning up the detach path for just that case
to the best possible.

So far we did a lot of the work in linux_pci_detach_device(), which is
the internal handler of the detach function and little in the
(*release) callback (devres cleanup only).
The problem with that is, that we tear down resources which later in the
devres cleanup are needed.  With them not being there anymore we panic, e.g.,
in lkpi_dma_unmap < lkpi_dmam_free_coherent < lkpi_devres_release_free_list.
The solution is to migrate most of the cleanup work into the (*release)
callback, which will automatically be called when the device (kobj) reference
drops to zero.  The only work which should be done immediately is to let the
dirver do its cleanup;  this has to happen before we try to teardown the
resources, but also we do want this to happen when detach is called

    [23 lines not shown]
DeltaFile
+129-14sys/compat/linuxkpi/common/src/linux_pci.c
+129-141 files

FreeBSD/src 058ce52sys/compat/linuxkpi/common/include/linux workqueue.h, sys/compat/linuxkpi/common/src linux_work.c

LinuxKPI: add system_percpu_wq

In Linux v6.17 system_wq was replaced (renamed to) system_percpu_wq,
with the old name still present.

We just alias system_percpu_wq to linux_system_short_wq like we do
for system_wq to keep both around for the forseeable future.

Note: the original system_wq was a per-cpu queue upstream as well
based on my understanding but we never implemented it as such.
That means we are still lacking a per-cpu implementation for
system_percpu_wq but at least we do not change the status-quo
of the LinuxKPI implementation with this.

Note2: we should add a check somewhere for LINUXKPI_VESION >=
61700 to print a warning if anyone still uses the system_wq
to detect any possible sami-native or out-of-tree drivers
relying on this and not properly updating.


    [4 lines not shown]
DeltaFile
+9-0sys/compat/linuxkpi/common/src/linux_work.c
+1-0sys/compat/linuxkpi/common/include/linux/workqueue.h
+10-02 files

FreeBSD/src 97de833sys/kern sys_procdesc.c kern_sig.c, sys/sys procdesc.h

kern: add fget_procdesc()

Convert several callers to use fget_procdesc().
Eliminate procdesc_find() and directly use fget_procdesc() in
sys_pdkill().  Previous code structure required to fdrop() procdesc
while the process is locked.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58117
DeltaFile
+77-83sys/kern/sys_procdesc.c
+10-4sys/kern/kern_sig.c
+3-7sys/kern/kern_exit.c
+3-3sys/sys/procdesc.h
+93-974 files

FreeBSD/src cc3f89cshare/monetdef_unicode sr_RS.UTF-8@latin.src fr_CH.UTF-8.src, share/numericdef_unicode fr_CH.UTF-8.src Makefile

locale: make install Unicode 17.0.0/CLDR 48.2

Data changes:

48.1:
- Update RSD (Serbian Dinar) to use 2-digits for non-cash and 0-digits
  for cash.
- Fix issue with tippi and bindi in Punjabi exemplars.
- Fix parsing issue in numeric date+time patterns for zh_Hant and yue.
- Fix issues with hour cycle display names for several languages.

https://cldr.unicode.org/downloads/cldr-48#481-changes

48.2:
- Group separator for number formatting was updated to ' in fr-CH
  consistent with other Swiss locales.
- Some fixes to date formats including: Hv available formats were
  updated to match behavior in CLDR 47 due to web compatibility issues
  related to current JS capabilities.

    [11 lines not shown]
DeltaFile
+4,516-1tools/tools/locale/etc/final-maps/widths.txt
+14-0share/numericdef_unicode/fr_CH.UTF-8.src
+2-2share/monetdef_unicode/sr_RS.UTF-8@latin.src
+1-1tools/tools/locale/etc/final-maps/map.UTF-8
+1-1share/monetdef_unicode/fr_CH.UTF-8.src
+1-1share/numericdef_unicode/Makefile
+4,535-61 files not shown
+4,536-77 files

FreeBSD/src e8cca47tools/tools/locale Makefile

locale: Update Unicode to CLDR 48.2

Notable changes:

- Group separator for number formatting was updated to ' in fr-CH
  consistent with other Swiss locales.
- Some fixes to date formats including: Hv available formats were
  updated to match behavior in CLDR 47 due to web compatibility issues
  related to current JS capabilities.
- Emoji annotations fixes including collisions between emoji short
  names.
- Updated AM/PM for ko & ps to be consistent with how the wide forms are
  localized.

Reviewed by:    bapt
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D57626

(cherry picked from commit 9edbff33aa299dfe7693e18f5bff682bd7ac6b40)
DeltaFile
+1-1tools/tools/locale/Makefile
+1-11 files

FreeBSD/src a0b6231tools/tools/locale Makefile

locale: Do not strip the suffix from CLDRVERSION

The upstream CLDR directory structure requires the full version string.
Remove the ':R' modifier to fix the fetch paths.

Previously this worked because major releases were published in a
directory without the ".0" suffix, while the filenames included it.
Starting with CLDR 47, the upstream layout changed to use the full
version string exclusively, causing the fetch URLs to break for point
releases.

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

(cherry picked from commit 77ca1ce66283aa84258ef2323b692711df16158c)
DeltaFile
+3-3tools/tools/locale/Makefile
+3-31 files

FreeBSD/src 67f1c08usr.bin/mkimg gpt.c scheme.c

mkimg: Add ms-basic-data alias for GPT

While preparing GPT-schemed RaspberryPi images for the NanoBSD
Reimagined GSoC 2026 project, a discrepancy was identified between
mkimg(1) and gpart(8) regarding Microsoft Basic Data partitions (GUID
!ebd0a0a2-b9e5-4433-87c0-68b6b72699c7).

Currently, mkimg(1) relies on the MBR-centric name "ntfs" to identify
this partition type under the GPT scheme.  Conversely, gpart(8)
identifies this type as "ms-basic-data".

To allow automation scripts (such as those consuming from gpart backup)
to use a common partition type across tools, add ALIAS_MS_BASIC_DATA as
a valid alias.

This is part of a larger effort to avoid a custom, MBR-based image
generation logic for embedded SoCs like the Raspberry Pi, standardizing
on GPT layouts across all supported FreeBSD embedded devices.


    [3 lines not shown]
DeltaFile
+1-0usr.bin/mkimg/gpt.c
+1-0usr.bin/mkimg/scheme.c
+1-0usr.bin/mkimg/scheme.h
+3-03 files

FreeBSD/src 141b664lib/libnetmap nmreq.c

libnetmap: fix extra indirection in nmreq_remove_option

Reviewed by:    zlei, vmaffione
Obtained from:  https://github.com/luigirizzo/netmap/commit/7d9177ed9a121e66bf4eaa0acb5d574e408297da
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D58151
DeltaFile
+1-1lib/libnetmap/nmreq.c
+1-11 files

FreeBSD/src fcaf15elib/libnetmap nmport.c

libnetmap: fix error path in nmport_extmem_from_file

Reviewed by:    zlei, vmaffione
Obtained from:  https://github.com/luigirizzo/netmap/commit/b52a2bcae35e56548acfb0849b248a1e4b0c0c3b
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D58150
DeltaFile
+3-1lib/libnetmap/nmport.c
+3-11 files

FreeBSD/src f2f50c8usr.bin/sockstat main.c

sockstat: fix SCTP support

Provide a name for SCTP sockets.

Fixes:          8b2b62b49d88 ("sockstat: consolidate unix(4) protocols in the array of protocols")
DeltaFile
+2-0usr.bin/sockstat/main.c
+2-01 files

FreeBSD/src 920518csys/dev/fdt fdt_common.c fdt_common.h

FDT: implement fdt_ether_get_addr()

Introduce fdt_ether_get_addr() in fdt_common.c/h that tries standard
DT properties in the correct order and falls back to a random address
when needed. This should be used by ethernet drivers instead of open-coding
the same logic.

MFC after:      2 weeks

Reviewed by:    mhorne, adrian, bz, jrtc27
Differential Revision:  https://reviews.freebsd.org/D58104
DeltaFile
+40-0sys/dev/fdt/fdt_common.c
+4-0sys/dev/fdt/fdt_common.h
+44-02 files

FreeBSD/src e16857eshare/man/man5 src.conf.5, tools/build/options WITH_CCACHE_BUILD

src.conf(5): Suggest using ccache4

We have separate ports for Ccache 3 and 4.  Suggest both, rather than
only the Ccache 3 port.  Rearrange the text somewhat to avoid an
excessively ragged edge on a standard 80-column terminal.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D58005

(cherry picked from commit a2545f68f64b4cfcc13ca2d372c8b9fef1c6331e)
DeltaFile
+7-10tools/build/options/WITH_CCACHE_BUILD
+10-6share/man/man5/src.conf.5
+17-162 files

FreeBSD/src b775479share/man/man5 src.conf.5, tools/build/options WITH_CCACHE_BUILD

src.conf(5): Suggest using ccache4

We have separate ports for Ccache 3 and 4.  Suggest both, rather than
only the Ccache 3 port.  Rearrange the text somewhat to avoid an
excessively ragged edge on a standard 80-column terminal.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D58005

(cherry picked from commit a2545f68f64b4cfcc13ca2d372c8b9fef1c6331e)
DeltaFile
+8-11share/man/man5/src.conf.5
+7-10tools/build/options/WITH_CCACHE_BUILD
+15-212 files

FreeBSD/src cd2c145share/mk bsd.compiler.mk, tools/build/options WITH_CCACHE_BUILD

share/mk: Add sccache suport for WITH_CCACHE_BUILD option

By setting CCACHE_NAME=sccache , sccache can be used as an alternative
for ccache.

Reviewed by:    emaste, jhb
Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49417

(cherry picked from commit 10cb3979a9bde6c8e441e3ba4aa5fd09963c484f)
DeltaFile
+11-1share/mk/bsd.compiler.mk
+7-0tools/build/options/WITH_CCACHE_BUILD
+18-12 files