FreeBSD/src 02a810dlib/libc/stdlib strfmon.c, lib/libc/tests/stdlib strfmon_test.c

strfmon: Fix negative sign handling for C locale

If the locale's positive_sign and negative_sign values would both be
returned by localeconv() as empty strings, strfmon() shall behave as if
the negative_sign value was the string "-".

This occurs with the C locale.  The implementation previously assigned
"0" to sign_posn (parentheses around the entire string); now it assigns
it to "1" (sign before the string) when it is undefined (CHAR_MAX).

Austin Group Defect 1199[1] is applied, changing the requirements for
the '+' and '(' flags.

[1]: https://www.austingroupbugs.net/view.php?id=1199

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53913

(cherry picked from commit cf85e7034ad5640b18a3b68d6b291b7bf89bfc80)
DeltaFile
+3-3lib/libc/tests/stdlib/strfmon_test.c
+1-1lib/libc/stdlib/strfmon.c
+4-42 files

FreeBSD/src 6b0e995lib/libc/stdlib strfmon.3 strfmon.c, lib/libc/tests/stdlib strfmon_test.c

strfmon: EINVAL if the '+' flag and both signs are empty

According to the Open Group Base Specifications Issue 8[1], strfmon(3)
should return EINVAL when the '+' flag was included in a conversion
specification and the locale's positive_sign and negative_sign values
would both be returned by localeconv(3) as empty strings.

Austin Group Defect 1199[2] is applied, adding the [EINVAL] error.

[1]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/strfmon.html
[2]: https://www.austingroupbugs.net/view.php?id=1199

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53912

(cherry picked from commit 1fd018972a18b682521bb8f004dfd162327e5db2)
DeltaFile
+11-1lib/libc/stdlib/strfmon.3
+4-4lib/libc/tests/stdlib/strfmon_test.c
+3-1lib/libc/stdlib/strfmon.c
+18-63 files

FreeBSD/src 33189f8lib/libc/tests/stdlib strfmon_test.c

strfmon: Add tests for Austin Group Defect 1199

Add tests for The Open Group Base Specifications Issue 8[1], Austin
Group Defect 1199[2].

Items marked with XXX represent an invalid output.  These items will be
fixed in subsequent commits.

Notice that an existing test is now considered invalid.

Our locale definitions do not include int_p_sep_by_space nor
int_n_sep_by_space[3].  Those will be addressed in a subsequent commit.
However, the CLDR project defines them as "0", which causes the output
to appear as "USD123.45".  If our locale definitions were to set the
international {n,p}_sep_by_space to "1", the output would display as the
expected "USD 123.45".

While here, use the SPDX license identifier and add my name to the
file.

    [10 lines not shown]
DeltaFile
+57-23lib/libc/tests/stdlib/strfmon_test.c
+57-231 files

FreeBSD/src 6cccf4dlib/libc/stdlib strfmon.c

strfmon: Fix typo s/poistion/position/

MFC after:      1 week

(cherry picked from commit 91e7f19ec4056587a85c1461a4f34a6d5d4b7b52)
DeltaFile
+1-1lib/libc/stdlib/strfmon.c
+1-11 files

FreeBSD/src 1869d60lib/libc/stdlib strfmon.c, lib/libc/tests/stdlib strfmon_test.c

strfmon: Fix negative sign handling for C locale

If the locale's positive_sign and negative_sign values would both be
returned by localeconv() as empty strings, strfmon() shall behave as if
the negative_sign value was the string "-".

This occurs with the C locale.  The implementation previously assigned
"0" to sign_posn (parentheses around the entire string); now it assigns
it to "1" (sign before the string) when it is undefined (CHAR_MAX).

Austin Group Defect 1199[1] is applied, changing the requirements for
the '+' and '(' flags.

[1]: https://www.austingroupbugs.net/view.php?id=1199

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53913

(cherry picked from commit cf85e7034ad5640b18a3b68d6b291b7bf89bfc80)
DeltaFile
+3-3lib/libc/tests/stdlib/strfmon_test.c
+1-1lib/libc/stdlib/strfmon.c
+4-42 files

FreeBSD/src 8dc8e30lib/libc/stdlib strfmon.3 strfmon.c, lib/libc/tests/stdlib strfmon_test.c

strfmon: EINVAL if the '+' flag and both signs are empty

According to the Open Group Base Specifications Issue 8[1], strfmon(3)
should return EINVAL when the '+' flag was included in a conversion
specification and the locale's positive_sign and negative_sign values
would both be returned by localeconv(3) as empty strings.

Austin Group Defect 1199[2] is applied, adding the [EINVAL] error.

[1]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/strfmon.html
[2]: https://www.austingroupbugs.net/view.php?id=1199

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53912

(cherry picked from commit 1fd018972a18b682521bb8f004dfd162327e5db2)
DeltaFile
+11-1lib/libc/stdlib/strfmon.3
+4-4lib/libc/tests/stdlib/strfmon_test.c
+3-1lib/libc/stdlib/strfmon.c
+18-63 files

FreeBSD/src 7745ecelib/libc/tests/stdlib strfmon_test.c

strfmon: Add tests for Austin Group Defect 1199

Add tests for The Open Group Base Specifications Issue 8[1], Austin
Group Defect 1199[2].

Items marked with XXX represent an invalid output.  These items will be
fixed in subsequent commits.

Notice that an existing test is now considered invalid.

Our locale definitions do not include int_p_sep_by_space nor
int_n_sep_by_space[3].  Those will be addressed in a subsequent commit.
However, the CLDR project defines them as "0", which causes the output
to appear as "USD123.45".  If our locale definitions were to set the
international {n,p}_sep_by_space to "1", the output would display as the
expected "USD 123.45".

While here, use the SPDX license identifier and add my name to the
file.

    [10 lines not shown]
DeltaFile
+57-23lib/libc/tests/stdlib/strfmon_test.c
+57-231 files

FreeBSD/src f830e53lib/libc/stdlib strfmon.c

strfmon: Fix typo s/poistion/position/

MFC after:      1 week

(cherry picked from commit 91e7f19ec4056587a85c1461a4f34a6d5d4b7b52)
DeltaFile
+1-1lib/libc/stdlib/strfmon.c
+1-11 files

FreeBSD/src 06c2e9blib/libc/stdlib strfmon.c, lib/libc/tests/stdlib strfmon_test.c

strfmon: Fix negative sign handling for C locale

If the locale's positive_sign and negative_sign values would both be
returned by localeconv() as empty strings, strfmon() shall behave as if
the negative_sign value was the string "-".

This occurs with the C locale.  The implementation previously assigned
"0" to sign_posn (parentheses around the entire string); now it assigns
it to "1" (sign before the string) when it is undefined (CHAR_MAX).

Austin Group Defect 1199[1] is applied, changing the requirements for
the '+' and '(' flags.

[1]: https://www.austingroupbugs.net/view.php?id=1199

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53913

(cherry picked from commit cf85e7034ad5640b18a3b68d6b291b7bf89bfc80)
DeltaFile
+3-3lib/libc/tests/stdlib/strfmon_test.c
+1-1lib/libc/stdlib/strfmon.c
+4-42 files

FreeBSD/src 488c4a5lib/libc/stdlib strfmon.3 strfmon.c, lib/libc/tests/stdlib strfmon_test.c

strfmon: EINVAL if the '+' flag and both signs are empty

According to the Open Group Base Specifications Issue 8[1], strfmon(3)
should return EINVAL when the '+' flag was included in a conversion
specification and the locale's positive_sign and negative_sign values
would both be returned by localeconv(3) as empty strings.

Austin Group Defect 1199[2] is applied, adding the [EINVAL] error.

[1]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/strfmon.html
[2]: https://www.austingroupbugs.net/view.php?id=1199

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53912

(cherry picked from commit 1fd018972a18b682521bb8f004dfd162327e5db2)
DeltaFile
+11-1lib/libc/stdlib/strfmon.3
+4-4lib/libc/tests/stdlib/strfmon_test.c
+3-1lib/libc/stdlib/strfmon.c
+18-63 files

FreeBSD/src d3dbfablib/libc/tests/stdlib strfmon_test.c

strfmon: Add tests for Austin Group Defect 1199

Add tests for The Open Group Base Specifications Issue 8[1], Austin
Group Defect 1199[2].

Items marked with XXX represent an invalid output.  These items will be
fixed in subsequent commits.

Notice that an existing test is now considered invalid.

Our locale definitions do not include int_p_sep_by_space nor
int_n_sep_by_space[3].  Those will be addressed in a subsequent commit.
However, the CLDR project defines them as "0", which causes the output
to appear as "USD123.45".  If our locale definitions were to set the
international {n,p}_sep_by_space to "1", the output would display as the
expected "USD 123.45".

While here, use the SPDX license identifier and add my name to the
file.

    [10 lines not shown]
DeltaFile
+57-23lib/libc/tests/stdlib/strfmon_test.c
+57-231 files

FreeBSD/src 2929eb9lib/libc/stdlib strfmon.c

strfmon: Fix typo s/poistion/position/

MFC after:      1 week

(cherry picked from commit 91e7f19ec4056587a85c1461a4f34a6d5d4b7b52)
DeltaFile
+1-1lib/libc/stdlib/strfmon.c
+1-11 files

FreeBSD/src fc9666dsys/compat/linuxkpi/common/include/linux device.h

LinuxKPI: device: add a pr_debug("TODO") call to device_release_driver()

The logic in device_release_driver() got disabled in 93b14194acaf2
and since left alone.  Add a pr_debug() call so we have a chance to
notice if that code is actually still in need to be fixed and re-enabled.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+1-0sys/compat/linuxkpi/common/include/linux/device.h
+1-01 files

FreeBSD/src 86bfe5bsys/compat/linuxkpi/common/include/net mac80211.h

LinuxKPI: 802.11: make airtime fairness an IMPROVE

We are ways away from implementing "airtime fairness" in LinuxKPI
(or rather net80211).  For now make it an 'improve' rather than a
'todo' to get the logging away.  Everything will work without it.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+1-1sys/compat/linuxkpi/common/include/net/mac80211.h
+1-11 files

FreeBSD/src 45d8bfdsys/compat/linuxkpi/common/src linux_page.c

LinuxKPI: page.c: remove a spurious character from a comment

No functional changes.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+1-1sys/compat/linuxkpi/common/src/linux_page.c
+1-11 files

FreeBSD/src 39b2ca9share/man/man7 freebsd-base.7

freebsd-base.7: Rewrite table into a tagged list

The table is not playing nicely with
https://man.freebsd.org/freebsd-base

MFC after:              3 days
Reviewed by:            pauamma at gundo.com
Differential Revision:  https://reviews.freebsd.org/D54036
DeltaFile
+18-9share/man/man7/freebsd-base.7
+18-91 files

FreeBSD/src df81545share/man/man7 release.7

release.7: PKGBASE is now the default

Signed-off-by:  polyduekes-git <polyduekes at proton.me>
Reviewed by:    cperciva, emaste, ziaee
Closes:         https://github.com/freebsd/freebsd-src/pull/1913
DeltaFile
+3-4share/man/man7/release.7
+3-41 files

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

LinuxKPI: 802.11: when synching HT and VHT cap, mask rx_mcs

When we sync the sta data, mask the rx_mcs with what the hardware is
able to do so that we do not leave, e.g., a 2nd stream enabled on a 1x1
chipset.
iwlwifi(4) has a further check for the smps_mode to limit to NSS=1 but
I believe that is historic and not actually in use anymore.

This fixes firmware crashes on TLC updates with nss=1 but the nss=2 array
index also being populated (with HT/VHT80/160 mcs information):
data being populated:
  iwlwifi0: 0x20101A0D | ADVANCED_SYSASSERT
  iwlwifi0: 0x00000006 | umac data1
  iwlwifi0: 0x00000001 | umac data2
  iwlwifi0: 0x000003FF | umac data3
  iwlwifi0: 0x____050F | last host cmd

Reported by:    Claudio Zumbo (claudiozumbo gmail.com), Erik Power
Tested by:      Claudio Zumbo, Erik Power (eppower umich.edu)

    [3 lines not shown]
DeltaFile
+71-28sys/compat/linuxkpi/common/src/linux_80211.c
+71-281 files

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

LinuxKPI: pci: undo the pci_resource_len() check in lkpi_pci_request_region()

Creating non-passthru SR-IOV interfaces on a mlx5en(4) failed.
The problem lies in the pci_resource_len() call but not that the BAR length
is tmeporary 0 but in that we call lkpi_pci_get_bar() with a true argument
which will create the BAR resource for us and report the approriate length
back.  However, the later call to bus_alloc_resource_any() will then fail
given the resource already exists.

Restore the previous behaviour and let bus_alloc_resource_any() do the
work.  Adjust the return values from -ENODEV to -EBUSY to match callers
expectations.

In linuxkpi_pcim_request_all_regions(), like in linuxkpi_pci_request_regions(),
filter out the -EBUSY errors as "not an error" and try the next bar.
This also seems to be consistent with the expectations of the callers.

PR:             290793
Reported by:    David BOYER (jcduss13 gmail.com)

    [6 lines not shown]
DeltaFile
+3-10sys/compat/linuxkpi/common/src/linux_pci.c
+3-101 files

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-1sqlite3.pc.in
+1-1sqlite3rc.h
+1-1VERSION
+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