FreeBSD/src 07593d1sys/dev/efidev efirt.c

efirt: Fix the TDP_EFIRT assertion

Fixes:  a03957a706a0 ("efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag")
DeltaFile
+1-1sys/dev/efidev/efirt.c
+1-11 files

FreeBSD/src 5d12db2sys/cddl/contrib/opensolaris/uts/common/dtrace dtrace.c, sys/cddl/dev/dtrace dtrace_load.c dtrace_ioctl.c

dtrace: Avoid excessive pcpu allocations

We were previously allocating MAXCPU structures for several purposes,
but this is generally unnecessary and is quite excessive, especially
after MAXCPU was bumped to 1024 on amd64 and arm64.  We already are
careful to allocate only as many per-CPU tracing buffers as are needed;
extend this to other allocations.

For example, in a 2-vCPU VM, the size of a consumer state structure
drops from 64KB to 128B.  The size of the per-consumer `dts_buffer` and
`dts_aggbuffer` arrays shrink similarly.  Ditto for pre-allocations of
local and global D variable storage space.

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D47667
DeltaFile
+30-36sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+2-2sys/cddl/dev/dtrace/dtrace_load.c
+1-1sys/cddl/dev/dtrace/dtrace_ioctl.c
+33-393 files

FreeBSD/src 4efe531sys/kern vfs_bio.c, sys/sys buf.h

buf: Add a runningbufclaim() helper

No functional change intended.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D47696
DeltaFile
+12-3sys/kern/vfs_bio.c
+4-7sys/ufs/ffs/ffs_snapshot.c
+4-4sys/vm/vnode_pager.c
+1-3sys/ufs/ffs/ffs_vfsops.c
+1-1sys/sys/buf.h
+22-185 files

FreeBSD/src cc3da19sys/cddl/dev/dtrace/amd64 dtrace_asm.S dtrace_subr.c

dtrace/amd64: Make invop providers usable with KMSAN enabled

- Use a fresh context when entering dtrace_invop() via a breakpoint
  exception.
- Mark the #BP trapframe as initialized.

MFC after:      2 weeks
DeltaFile
+8-0sys/cddl/dev/dtrace/amd64/dtrace_asm.S
+3-0sys/cddl/dev/dtrace/amd64/dtrace_subr.c
+11-02 files

FreeBSD/src 418d8f0sys/cddl/dev/dtrace/x86 dis_tables.c

dtrace: Address KMSAN warnings in dtrace_disx86

wbit was not being initialized in a couple of cases.

Reported by:    asomers
MFC after:      2 weeks
DeltaFile
+4-2sys/cddl/dev/dtrace/x86/dis_tables.c
+4-21 files

FreeBSD/src 0289db3sys/netlink/route iface.c

netlink/route: Fix the argument list for rtnl_handle_iflink()

This function is registered as a ifnet_link_event and so should have the
corresponding argument list.

PR:             282870
Reported by:    nakayamakenjiro at gmail.com
MFC after:      1 week
DeltaFile
+1-1sys/netlink/route/iface.c
+1-11 files

FreeBSD/src f85dd3fshare/man/man5 src.conf.5

src.conf.5: Regen after MK_PROFILE removal

Fixes: 3750ccefb862 ("Retire MK_PROFILE infrastructure")
Sponsored by: The FreeBSD Foundation
DeltaFile
+1-6share/man/man5/src.conf.5
+1-61 files

FreeBSD/src 6463b6bsbin/pfctl pfctl_radix.c pfctl_table.c, tests/sys/netpfil/pf table.sh

pfctl: clear statistic for specified addresses

The ioctl DIOCRCLRASTATS provides the functionality of clearing stats
not only for the whole table for for addresses stored in that table. The
functionality was missing from pfctl, though. Add it now.

PR:             282877
Obtained from:  OpenBSD, kirill <kirill at openbsd.org>, e496dff3a7
MFC after:      3 weeks
DeltaFile
+57-0tests/sys/netpfil/pf/table.sh
+23-0sbin/pfctl/pfctl_radix.c
+15-2sbin/pfctl/pfctl_table.c
+3-3sbin/pfctl/pfctl.8
+1-0sbin/pfctl/pfctl.h
+99-55 files

FreeBSD/src c5a7b58lib/libthr/tests atfork_test.c, lib/libthr/thread thr_fork.c thr_init.c

libthr: allow very early atfork registration

LSan wants to be able to register atfork handlers at __lsan_init time,
which can happen either at the first intercepted function call or in a
.preinit_array function.  Both of these end up being very early in rtld
and executed with the bind lock held, which ends up causing problems
when we go to _libpthread_init().

Instead of requiring libpthread to be initialized, just insert the new
atfork handler straight into the list if it's not ready yet.  The
critical section and locking should not be necessary if we're really
executing this early, as there won't be any threads to contend with.

Reviewed by:    kib (earlier version), markj

(cherry picked from commit 4b202f4faf40fd7af8b84491360186aed8ce5733)
DeltaFile
+53-0lib/libthr/tests/atfork_test.c
+12-8lib/libthr/thread/thr_fork.c
+0-1lib/libthr/thread/thr_init.c
+65-93 files

FreeBSD/src 654292clib/libthr/tests atfork_test.c Makefile

libthr: add some tests for pthread_atfork() handling

Test that it generally functions, and also that registering multiple
times calls each handler in the order that it's documented to call them
in.

Reviewed by:    kib, markj

(cherry picked from commit 7e6ac503ffeb81733272d54af367db58e45e57ca)
DeltaFile
+227-0lib/libthr/tests/atfork_test.c
+1-0lib/libthr/tests/Makefile
+228-02 files

FreeBSD/src 7951b4fsys/kern kern_umtx.c

_utmx_op: don't recurse on chain busy

In handling a PP mutex, we'll busy it as soon as we enter the loop and
unbusy it either prior to sleeping or at exit time.  In this particular
case, if we fail to transition the mutex from OWNERDEAD -> owned because
of casueword(9) failure and the suspend check fails, we'll start over
and attempt to busy an already-busied chain and irrecoverably lock up
both this thread and anything else that tries to busy the chain.

Unbusy the chain prior to restarting because I couldn't decide if that
was a better or worse idea than just keeping track of whether we dirtied
it in do_lock_pp() and avoiding re-dirty.  This is marginally easier to
reason about as it returns us to expected state on entry to the loop.

While we're here, simplify the code a bit as `error` will be clobbered
right after the branch anyways.

Reviewed by:    kib, olce (both earlier version)

(cherry picked from commit f660777865fcc28e147b51362412e0286e7df78e)
DeltaFile
+3-5sys/kern/kern_umtx.c
+3-51 files

FreeBSD/src 4729bb3share/timedef ca_IT.ISO8859-15.src ca_IT.UTF-8.src

timedef: remove redundancy in Catalan date_fmt definitions

This is already factored into the month names, resulting in an awkward
construction:

$ env LC_ALL=ca_ES.UTF-8 date
dimecres,  6 de de novembre de 2024, 21:21:18 CST

This would now render as:

$ env LC_ALL=ca_ES.UTF-8 date
dimecres,  6 de novembre de 2024, 21:22:41 CST

Reviewed by:    bapt, royger
Sponsored by:   Klara, Inc.

(cherry picked from commit a4b7367eb027a99b9eb48bf18951049434a9e189)
DeltaFile
+1-1share/timedef/ca_IT.ISO8859-15.src
+1-1share/timedef/ca_IT.UTF-8.src
+2-22 files

FreeBSD/src 4e60912usr.bin/sed main.c, usr.bin/sed/tests sed2_test.sh

sed: fix commandline-given expression when -e is not used

Make explicit sed commands (first on commandline) behave the same
as those given with -e.

Without this patch the following two commands behave differently,
the second one being wrong:
echo ab | sed -e $'1 i\\\n--'
echo ab | sed $'1 i\\\n--'

Reviewed by:    0mp, des, kevans
Sponsored by:   Klara, Inc.

(cherry picked from commit 0552fdc62caf034397ffd5b07dfbad853aef5aa8)
DeltaFile
+13-0usr.bin/sed/tests/sed2_test.sh
+5-5usr.bin/sed/main.c
+18-52 files

FreeBSD/src f4f4fa8tools/tools/locale/tools getwidths.c

localedata: add some exceptions to utf8proc widths

Hangul Jamo medial vowels and final consonants are reportedly combining
characters that won't take up any columns on their own and should be
reported as zero-width, so add an exception for these as well to reflect
how they work in practice.  This conforms to how other implementations
(e.g., glibc) treat these characters.

Reviewed by:    bapt (earlier version), jkim
Sponsored by:   Klara, Inc.

(cherry picked from commit 160c36eae41afa3c4944ed44778c2b48db8fbb77)
DeltaFile
+17-1tools/tools/locale/tools/getwidths.c
+17-11 files

FreeBSD/src a85a7f2tools/tools/locale/etc/final-maps widths.txt

localedata: update widths.txt after recent Hangul exceptions

Sponsored by:   Klara, Inc.

(cherry picked from commit 0f30aed1056a2e12ca40095debff6735642c4ff4)
DeltaFile
+160-0tools/tools/locale/etc/final-maps/widths.txt
+160-01 files

FreeBSD/src 7c09accsys/kern kern_umtx.c

_utmx_op: don't recurse on chain busy

In handling a PP mutex, we'll busy it as soon as we enter the loop and
unbusy it either prior to sleeping or at exit time.  In this particular
case, if we fail to transition the mutex from OWNERDEAD -> owned because
of casueword(9) failure and the suspend check fails, we'll start over
and attempt to busy an already-busied chain and irrecoverably lock up
both this thread and anything else that tries to busy the chain.

Unbusy the chain prior to restarting because I couldn't decide if that
was a better or worse idea than just keeping track of whether we dirtied
it in do_lock_pp() and avoiding re-dirty.  This is marginally easier to
reason about as it returns us to expected state on entry to the loop.

While we're here, simplify the code a bit as `error` will be clobbered
right after the branch anyways.

Reviewed by:    kib, olce (both earlier version)

(cherry picked from commit f660777865fcc28e147b51362412e0286e7df78e)
DeltaFile
+3-5sys/kern/kern_umtx.c
+3-51 files

FreeBSD/src 8ded8a2share/timedef ca_IT.ISO8859-15.src ca_IT.UTF-8.src

timedef: remove redundancy in Catalan date_fmt definitions

This is already factored into the month names, resulting in an awkward
construction:

$ env LC_ALL=ca_ES.UTF-8 date
dimecres,  6 de de novembre de 2024, 21:21:18 CST

This would now render as:

$ env LC_ALL=ca_ES.UTF-8 date
dimecres,  6 de novembre de 2024, 21:22:41 CST

Reviewed by:    bapt, royger
Sponsored by:   Klara, Inc.

(cherry picked from commit a4b7367eb027a99b9eb48bf18951049434a9e189)
DeltaFile
+1-1share/timedef/ca_IT.ISO8859-15.src
+1-1share/timedef/ca_IT.UTF-8.src
+2-22 files

FreeBSD/src 8b30c13tools/tools/locale/tools getwidths.c

localedata: add some exceptions to utf8proc widths

Hangul Jamo medial vowels and final consonants are reportedly combining
characters that won't take up any columns on their own and should be
reported as zero-width, so add an exception for these as well to reflect
how they work in practice.  This conforms to how other implementations
(e.g., glibc) treat these characters.

Reviewed by:    bapt (earlier version), jkim
Sponsored by:   Klara, Inc.

(cherry picked from commit 160c36eae41afa3c4944ed44778c2b48db8fbb77)
DeltaFile
+17-1tools/tools/locale/tools/getwidths.c
+17-11 files

FreeBSD/src 0350ebatools/tools/locale/etc/final-maps widths.txt

localedata: update widths.txt after recent Hangul exceptions

Sponsored by:   Klara, Inc.

(cherry picked from commit 0f30aed1056a2e12ca40095debff6735642c4ff4)
DeltaFile
+160-0tools/tools/locale/etc/final-maps/widths.txt
+160-01 files

FreeBSD/src 3f309e9usr.bin/sed main.c, usr.bin/sed/tests sed2_test.sh

sed: fix commandline-given expression when -e is not used

Make explicit sed commands (first on commandline) behave the same
as those given with -e.

Without this patch the following two commands behave differently,
the second one being wrong:
echo ab | sed -e $'1 i\\\n--'
echo ab | sed $'1 i\\\n--'

Reviewed by:    0mp, des, kevans
Sponsored by:   Klara, Inc.

(cherry picked from commit 0552fdc62caf034397ffd5b07dfbad853aef5aa8)
DeltaFile
+13-0usr.bin/sed/tests/sed2_test.sh
+5-5usr.bin/sed/main.c
+18-52 files

FreeBSD/src 56043cbsys/arm64/arm64 gicv3_its.c

gicv3: Use the correct mask

Mask off the bits we'll be setting, rather than retaining only those
bits.

Sponsored by: Netflix
DeltaFile
+1-1sys/arm64/arm64/gicv3_its.c
+1-11 files

FreeBSD/src 5395dddsys/conf newvers.sh

14.2: Update to RC1

Approved by:    re (implicit)
Sponsored by:   Amazon
DeltaFile
+1-1sys/conf/newvers.sh
+1-11 files

FreeBSD/src af96dc4release/tools oci-image-minimal.conf

release: Add missing dependencies in the minimal OCI image

The pkg-bootstrap binary depends on fetch.

Approved by:    re
Reviewed by:    cperciva, emaste, bapt
Differential Revision:  https://reviews.freebsd.org/D47661
MFC after:      1 day

(cherry picked from commit ca1f1d2c9419a5d66929ca6880b69901254645a6)
(cherry picked from commit 4a768794b836f781ecf798949b60e5c5d305f136)
DeltaFile
+3-0release/tools/oci-image-minimal.conf
+3-01 files

FreeBSD/src 42d33f9release Makefile

release: Don't break if firmware install fails

On some platforms (e.g. powerpc) we don't have packages, so we can't
install them onto the ISOs.  Proceed with building the images anyway.

Reported by:    Weekly snapshot builds
Fixes:  7e2996c1f5b4 ("release: install wireless firmware onto disc1 and dvd")
Approved by:    re (cperciva)

(cherry picked from commit e8263ace39c8ecf11233c0a10d0b1839e6813046)
(cherry picked from commit 9431091ee021eca9eb4c768b566e623ba9333b41)
DeltaFile
+2-2release/Makefile
+2-21 files

FreeBSD/src c5b8ed1release Makefile

release: install wireless firmware onto disc1 and dvd

Wireless driver firmware is no longer added to the src tree.
In order to have wireless support in the installer for the new drivers
we install the firmware packages onto disc1 (and memstick) and dvd
if built on FreeBSD and NOPKG is not defined (to not break cross-builds
from Linux or OSX and to allow people to opt-out).

Sponsored by:   The FreeBSD Foundation
Submitted by:   cperciva (the orig. commands and where to place them)
Reviewed by:    jrtc27
Approved by:    re (cperciva)
Differential Revision: https://reviews.freebsd.org/D47407

(cherry picked from commit 7e2996c1f5b4e684cae40c2418b68061df9997d9)
(cherry picked from commit b62012538e967b22736e8c2214b222f21146bddc)
DeltaFile
+19-0release/Makefile
+19-01 files

FreeBSD/src cce4df8usr.sbin/bsdinstall/scripts wlanconfig

bsdinstall: wlanconfig: fix interface UP on (re-)starting wpa_supplicant

Make sure an interface is back up before (re-)starting wpa_supplicant
in wlanconfig not relying on wpa to UP the interface (though we fixed
that).

Sponsored by:   The FreeBSD Foundation
Reviewed by:    emaste (in D47491)
Approved by:    re (cperciva)
Differential Revision: https://reviews.freebsd.org/D47491

(cherry picked from commit 5399052c63a7a3d2f54615d31bfd092ab887a600)
(cherry picked from commit 7d0c12e1f907ddf9be6668449a966703c0f781d1)
DeltaFile
+2-1usr.sbin/bsdinstall/scripts/wlanconfig
+2-11 files

FreeBSD/src 03c07bdusr.sbin/bsdinstall bsdinstall.8, usr.sbin/bsdinstall/scripts firmware Makefile

bsdinstall: add menu to install firmware

Add a menu to the installer to run fwget(8) inside the newly installed
system to install firmware known to be needed.
This requires working netowrking.

This is needed at least for wireless currently for when we entirely
stop shipping new firmware in src.git to have working networking on
the installed system (we already do need this for at least rtw89).

Sponsored by:   The FreeBSD Foundation
Tested with:    4 different iwlwifi chipsets in a system (earlier version)
Suggested improvments by: jrtc27
Approved by:    re (cperciva)
Differential Revision: https://reviews.freebsd.org/D47491

(cherry picked from commit bbe2a1da2df639c616869aa838244c8094779bd4)
(cherry picked from commit 15f6edf20e4e1542f2385a9cbd6e996e23252858)
DeltaFile
+125-0usr.sbin/bsdinstall/scripts/firmware
+18-1usr.sbin/bsdinstall/bsdinstall.8
+1-0usr.sbin/bsdinstall/scripts/Makefile
+1-0usr.sbin/bsdinstall/scripts/auto
+145-14 files

FreeBSD/src e6ec41fsys/amd64/amd64 trap.c

amd64 efi rt: handle #BP

PR:     282860
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D47694
DeltaFile
+12-0sys/amd64/amd64/trap.c
+12-01 files

FreeBSD/src a03957asys/dev/efidev efirt.c, sys/sys proc.h

efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D47694
DeltaFile
+7-1sys/dev/efidev/efirt.c
+1-1sys/sys/proc.h
+8-22 files

FreeBSD/src 38e3125sys/arm/nvidia/drm2 tegra_bo.c, sys/compat/linuxkpi/common/src linux_page.c

device_pager: user iterators to free device pages

Change cdev_mgtdev_page_free_page to take an iterator, rather than an
object and page, so that removing the page from the object radix tree
can take advantage of locality with iterators. Define a
general-purpose function to free all pages, which can be used in
several places.

Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D47692
DeltaFile
+30-10sys/vm/device_pager.c
+3-17sys/dev/drm2/ttm/ttm_bo_vm.c
+2-16sys/compat/linuxkpi/common/src/linux_page.c
+1-13sys/dev/xen/privcmd/privcmd.c
+1-12sys/dev/xen/gntdev/gntdev.c
+4-2sys/arm/nvidia/drm2/tegra_bo.c
+41-701 files not shown
+43-717 files