FreeBSD/src 2d7f1cfsys/kern syscalls.master

syscalls.master: Allow clock_nanosleep in capability mode

It is akin to nanosleep(2) and does not access global namespaces.
It should be permitted in capability mode.

Reviewed by: vangyzen
Fixes: 3f8455b0905a ("Add clock_nanosleep()")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57343

(cherry picked from commit 692b0ef1506ba51b72d0a2707cbf8879a6e01d78)
DeltaFile
+1-1sys/kern/syscalls.master
+1-11 files

FreeBSD/src aefff0asys/net if_media.h

if_media: Claim 10BASE-T1S and 10BASE-T1L constants

These are two single-pair Ethernet (SPE) variants that run at 10 Mbps.
10BASE-T1S has automotive origins and supports multiple nodes on up to
25m of cable.  10BASE-T1L is intended for building and industrial
automation and supports long-distance point to point links of over 1km.

Reviewed by:    kbowling
Differential Revision: https://reviews.freebsd.org/D56952

(cherry picked from commit a3036edd0292291a71fb74ba2bce355159ac6913)
DeltaFile
+6-0sys/net/if_media.h
+6-01 files

FreeBSD/src ad26a56sys/dev/acpica acpi_timer.c, sys/x86/include init.h

acpi_timer(4): Remove unused 'acpi_timer_disabled' boolean

Same reason as for the previous commit to acpi_cpu(4).  This boolean is
not used anywhere.  Disabling acpi_timer(4) can be done through the
regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable,
see acpi_disabled()).

Reviewed by:    emaste (implicit)
Fixes:          ac3ede5371af ("x86/xen: remove PVHv1 code")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-5sys/dev/acpica/acpi_timer.c
+0-3sys/x86/include/init.h
+1-82 files

FreeBSD/src 25df388sys/dev/acpica acpi_hpet.c, sys/x86/include init.h

acpi_hpet(4): Remove unused 'acpi_hpet_disabled' boolean

Same reason as for the previous commit to acpi_cpu(4).  This boolean is
not used anywhere.  Disabling acpi_hpet(4) can be done through the
regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable,
see acpi_disabled()).

Reviewed by:    emaste (implicit)
Fixes:          ac3ede5371af ("x86/xen: remove PVHv1 code")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-4sys/dev/acpica/acpi_hpet.c
+0-3sys/x86/include/init.h
+1-72 files

FreeBSD/src c5be733lib/msun/tests logarithm_test.c

msun/logarithm_test: expect_fail log1p_accuracy_tests in the correct spot

While here, remove the conditional on the "ci" config var to ensure that
this is reproducible locally as well.

This fixes a case where we are expecting a fail before the failing ATF_CHECK_*
assertion happens. Found in a CI failure here:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16608/testReport/lib.msun/logarithm_test/log1p_accuracy_tests/

PR:             253984
Fixes:          405188aeac540f7666dfde37c2f32d222119f56e
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57351

(cherry picked from commit 19af9c77acc912e4bf90a667924f5f4ff78a7759)
DeltaFile
+3-4lib/msun/tests/logarithm_test.c
+3-41 files

FreeBSD/src be5333alib/msun/tests nan_test.c

lib/msun/tests: re-enable nan_test on riscv

Commit 1e25cda7f06923d05e28dac8eb1c1c428a5c92dc fixed it.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 52ad4f883489f73e7a876f5cf296bb5a7dc696a2)
DeltaFile
+0-3lib/msun/tests/nan_test.c
+0-31 files

FreeBSD/src 3e559actests/sys/kern ptrace_test.c

ptrace_test: expect PT_STEP tests to fail on riscv

ptrace_single_step currently returns EOPNOTSUPP on riscv.

This temporarily fixes the following CI failures:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__PT_STEP_with_signal/
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ptrace_test/ptrace__step_siginfo/

Reviewed by:    kib
Approved by:    emaste (mentor)
Differential Revision:  https://reviews.freebsd.org/D57288

(cherry picked from commit a7df326619ef9caa2ed00bf2d103dd278e7b32ec)
DeltaFile
+8-0tests/sys/kern/ptrace_test.c
+8-01 files

FreeBSD/src a13936ftests/sys/netpfil/pf route_to.sh

tests/pf/route_to: check_random: rely on test timeout to fail

This test is known to be flaky if 10 attempts happens to be
not enough for the test to pass. Usually, this test passes in ~4-6 attempts.
See https://ci.freebsd.org/job/FreeBSD-main-amd64-test/28664/testReport/junit/sys.netpfil.pf/route_to/random_table/

Rely on the timeout (default 5 mins) to catch a failure here, rather than just 10
attempts. It's very unlikely that 5 mins worth of attempts still isn't enough.

For a history of flakiness, see
https://ci.freebsd.org/job/FreeBSD-main-amd64-test/lastSuccessfulBuild/testReport/junit/sys.netpfil.pf/route_to/random_table/history/

PR:             289477
Reviewed by:    kp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57408

(cherry picked from commit 1294f332aec02e111b47d69e0d91e32dc2624001)
DeltaFile
+8-12tests/sys/netpfil/pf/route_to.sh
+8-121 files

FreeBSD/src 200f43flib/libc/riscv gd_qnan.h

libc: fix strtold NaN representation on riscv

Regenerate gd_qnan.h on riscv using the qnan.c
config tool found in contrib/gdtoa.

This fixes the following tests in CI:
lib/libc/stdio/scanfloat_test:infinities_and_nans
lib/libc/stdlib/strtod_test:strtold_nan

Reviewed by:    jrtc27
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57405

(cherry picked from commit 1e25cda7f06923d05e28dac8eb1c1c428a5c92dc)
DeltaFile
+3-3lib/libc/riscv/gd_qnan.h
+3-31 files

FreeBSD/src e639219lib/msun/tests invctrig_test.c logarithm_test.c

lib/msun/tests: xfail remaining failing tests on non-x86 archs

These are the remaining trivial xfail cases where no other
test logic changes are necessary.

Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
PR:             290099
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1871
(cherry picked from commit 405188aeac540f7666dfde37c2f32d222119f56e)
DeltaFile
+15-0lib/msun/tests/invctrig_test.c
+9-2lib/msun/tests/logarithm_test.c
+9-0lib/msun/tests/next_test.c
+9-0lib/msun/tests/ctrig_test.c
+9-0lib/msun/tests/fma_test.c
+3-1lib/msun/tests/trig_test.c
+54-35 files not shown
+69-311 files

FreeBSD/src a230865lib/msun/tests lrint_test.c

lib/msun/tests: xfail failing lrint_test cases on non-x86 archs

Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid
unexpected aborts.

Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
PR:             290099
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1871
(cherry picked from commit de601d5bf5c6d2409134abc4638c7a0818cc896e)
DeltaFile
+5-2lib/msun/tests/lrint_test.c
+5-21 files

FreeBSD/src 76c1cb3lib/libexecinfo/tests sigtramp_test.c

tests/sigtramp_test: xfail on non-amd64

This test fail until at least https://reviews.llvm.org/D155066 is
rebased and picked up for aarch64 and more work is done for the other
archs.

PR:             289096
Reviewed by:    jlduran
Fixes:          fef84fd8ae845e19cec0f6b9aac0e6451cca3d7a
MFC after:      3 days

(cherry picked from commit 0010c4b8a020dbeb81e61b71117d1caae9b044cc)
DeltaFile
+2-2lib/libexecinfo/tests/sigtramp_test.c
+2-21 files

FreeBSD/src f6ca004tests/sys/posixshm memfd_test.c

memfd_test: skip hugetlb testcase when large page requests are not supported

Fixes this CI test failure: https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16606/testReport/junit/sys.posixshm/memfd_test/hugetlb/

Reviewed by:    kevans
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57289

(cherry picked from commit 64b053f879a8b3c4aa31e1ab99340dfe0ddfea0c)
DeltaFile
+5-2tests/sys/posixshm/memfd_test.c
+5-21 files

FreeBSD/src bacf780lib/libc/tests/secure fortify_uio_test.c generate-fortify-tests.lua

libc/fortify_uio_test: replace stdin in base readv tests

This fixes the readv_before_end and preadv_before_end test
timeout failures on riscv.

See https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/lastCompletedBuild/testReport/lib.libc.secure/fortify_uio_test/readv_before_end/

Reviewed by:    kevans, emaste
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57420

(cherry picked from commit 9f2a38cf40f2632472b3889505fd1ab5d6ba9e1b)
DeltaFile
+18-0lib/libc/tests/secure/fortify_uio_test.c
+2-0lib/libc/tests/secure/generate-fortify-tests.lua
+20-02 files

FreeBSD/src c8039d9sys/netpfil/pf pf.c

pf: free match rules after exiting critical section

This fixes a panic reported on armv7:

sys/netpfil/pf/counters:match_block  ->  panic: free: called with spinlock or critical section held
[...]
vpanic() at vpanic
         pc = 0xc0321b5c  lr = 0xc02f7b5c (free+0x140)
         sp = 0xc8c858bc  fp = 0xc8c858e0
         r4 = 0xe2fad648  r5 = 0xe402ce78
         r6 = 0xc8c859e8  r7 = 0x0000001c
         r8 = 0xc8c858b4  r9 = 0xc0321b5c
        r10 = 0xc8c858bc
free() at free+0x140
         pc = 0xc02f7b5c  lr = 0xe2f4f920 ($a+0x5f8)
         sp = 0xc8c858e8  fp = 0xc8c85930
         r4 = 0xe402ce68  r5 = 0xc8c8599c
         r6 = 0xffffffff r10 = 0x0000001c
[...]

    [10 lines not shown]
DeltaFile
+4-4sys/netpfil/pf/pf.c
+4-41 files

FreeBSD/src 1a861f3lib/msun/tests invtrig_test.c

lib/msun/tests: xfail failing invtrig_test cases on non-x86

Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid
unexpected abort.

PR:             290099
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1871

(cherry picked from commit 5a0617454e37c6a3df4106c24bd5ad20b338fe3a)
DeltaFile
+19-7lib/msun/tests/invtrig_test.c
+19-71 files

FreeBSD/src 2dc5e14sys/amd64/conf GENERIC, sys/arm/conf std.armv7

GENERIC: enable extended error strings on all archs

This follows commit 3296fda0c309c873ae37a0a4e25ded3ae04b421c.

PR:             289236
Reviewed by:    kib
MFC after:      3 days

(cherry picked from commit f38cbefef8090f3363e5685c5a3b30ffbf1d3ad0)
DeltaFile
+1-1sys/amd64/conf/GENERIC
+1-1sys/arm64/conf/std.arm64
+1-0sys/i386/conf/GENERIC
+1-0sys/arm/conf/std.armv7
+1-0sys/powerpc/conf/GENERIC
+1-0sys/riscv/conf/GENERIC
+6-26 files

FreeBSD/src 12f47bfshare/man/man5 src.conf.5, share/mk src.opts.mk

src.opts.mk: enable OPENSSL_KTLS by default on riscv64

1e649491b8567151270095fda3bce8faea394952 enabled KERN_TLS in
riscv/conf/GENERIC, but didn't enable OPENSSL_KTLS.

This passes all testcases in the sys/kern/ssl_sendfile suite and
fixes CI failures seen here:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16606/testReport/sys.kern/ssl_sendfile/

PR:     293810
Fixes:  1e649491b8567151270095fda3bce8faea394952
MFC after:      3 days
Reviewed by:    gallatin, ngie
Differential Revision:  https://reviews.freebsd.org/D57316

(cherry picked from commit b61ab2d693c04d4be5468e7db4b03d5777228f95)
DeltaFile
+9-3share/man/man5/src.conf.5
+2-2share/mk/src.opts.mk
+11-52 files

FreeBSD/src c1cab43lib/msun/tests test-utils.h

lib/msun/tests: Add REQUIRE_ variants of test-utils macros

Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1871
(cherry picked from commit a9b1650f90f4dbc62baa52b395082b1714b6cbf3)
DeltaFile
+30-15lib/msun/tests/test-utils.h
+30-151 files

FreeBSD/src 86f5085contrib/netbsd-tests/lib/libm t_fe_round.c

lib/msun/tests: xfail fe_round on riscv64

Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and
avoid unexpected aborts.

Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
PR:             290099
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1871
(cherry picked from commit 6c18c40b29fd5ac66230af34726260ce2d47aecd)
DeltaFile
+5-2contrib/netbsd-tests/lib/libm/t_fe_round.c
+5-21 files

FreeBSD/src 11d85cecontrib/netbsd-tests/lib/libm t_fe_round.c, lib/msun/tests fmaxmin_test.c

lib/msun/tests: Remove newlines in ATF msgs

This fixes broken test reports with the following message:

lib/msun/fe_round_test:fe_round  ->  broken: Test result contains
multiple lines: expected_failure:
/usr/src/contrib/netbsd-tests/lib/libm/t_fe_round.c:95: Didn't get the
same rounding mode out!<<NEWLINE>>(index 0) fed in 64 rounding mode, got
0 out<<NEWLINE>>  [0.079s]

Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1871
(cherry picked from commit ec640742e30270098f8d982c1c0838f2dfde9ad5)
DeltaFile
+12-12contrib/netbsd-tests/lib/libm/t_fe_round.c
+1-1lib/msun/tests/fmaxmin_test.c
+13-132 files

FreeBSD/src 17e00bflib/msun/tests fma_test.c ctrig_test.c

lib/msun/tests: Replace remaining printf() with debug()

Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1871
(cherry picked from commit d03c9b8f662466537753056608d6a64d8c5513c3)
DeltaFile
+4-4lib/msun/tests/fma_test.c
+3-3lib/msun/tests/ctrig_test.c
+7-72 files

FreeBSD/src 98a7797sys/dev/acpica acpi_cpu.c, sys/x86/include init.h

acpi_cpu(4): Remove unused 'acpi_cpu_disabled' boolean

It is not used anywhere.  Disabling acpi_cpu(4) can be done through the
regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable,
see acpi_disabled()).

Reviewed by:    emaste, obiwac
Fixes:          ac3ede5371af ("x86/xen: remove PVHv1 code")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57888
DeltaFile
+1-4sys/dev/acpica/acpi_cpu.c
+0-3sys/x86/include/init.h
+1-72 files

FreeBSD/src 4e9d303stand/i386/pxeldr Makefile

pxeldr: Bump the limit by 30k for loader size

We have a ltitle wiggle room, so go ahead and bump the pxeldr size.
It should be a little larger than the limit we have for the /boot/loader
since we embed that in this loader...

Sponsored by:           Netflix
DeltaFile
+1-1stand/i386/pxeldr/Makefile
+1-11 files

FreeBSD/src afee781stand/efi/include ipxe_download.h, stand/efi/libefi efipart.c

loader.efi: Recognize new memdisk=<url> and memcd=<url> options

Support ipxe downloading of a memory disk (either presented to the OS as
a harddisk or a cd). This requires an ipxe server since it uses the ipxe
download protocol to grab the disk. If there is a disk, we add it to the
environment as a disk, and then the rest of the bootloader just sees it
and boots from it.

I've cribbed code from https://github.com/russor/memdisk_uefi and
adapted it to work in the context of the FreeBSD bootloader.

The ipxe_download.h file was created from the documentation of the
interface.

So a .ipxe file with the line
chain http://10.2.0.1/loader.efi memdisk=${cwduri}FreeBSD-15.1-RELEASE-amd64-bootonly.iso
would use the FreeBSD boot loader to boot the FreeBSD 15.1 release.

md(9) has a bug at the moment that prevents it from probing the

    [7 lines not shown]
DeltaFile
+421-0stand/efi/loader/decompress.c
+203-0stand/efi/loader/memdisk.c
+33-0stand/efi/include/ipxe_download.h
+19-0stand/efi/loader/decompress.h
+13-0stand/efi/loader/main.c
+5-3stand/efi/libefi/efipart.c
+694-32 files not shown
+700-38 files

FreeBSD/src ce9bfd7stand/efi/loader main.c

loader.efi: Refactor try_boot_device_partitions

Break out the probing into try_disk_and_partitions and adjust the trying
message slightly to be a little clearer what we're doing.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57802
DeltaFile
+26-22stand/efi/loader/main.c
+26-221 files

FreeBSD/src 82eb197stand/efi/loader main.c

loader.efi: Expand uefi_rootdev to probe disks

uefi_rootdev had to be the exact device to work. This is often difficult
to arrange and awkward. Instead, have it search the specified device: As
a partition if it specifies the partition, and as the whole disk if the
specified partition didn't work or it specifies a disk. This brings it
into lone what we do with other devices. This overrides the boot manager
search we do before we do this for the boot device, but this knob has
always been meant to overload the boot manager search.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57803
DeltaFile
+14-4stand/efi/loader/main.c
+14-41 files

FreeBSD/src 59219fcstand/efi/include efilib.h, stand/efi/libefi efipart.c

loader.efi: efiblk_memdisk_preload passes the VirtualDisks to FreeBSD

Set hint.md.%d.physaddr and hint.md.%d.len for each of the VirtualDisks.
The memory for these remains after we exit boot services so FreeBSD can
use them. This leverages the BIOS work we did for memdisks. In
hindsight, I should have passed this in via metadata, but it's been in a
release.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57806
DeltaFile
+44-0stand/efi/libefi/efipart.c
+1-0stand/efi/include/efilib.h
+45-02 files

FreeBSD/src 3e3fd1fstand/efi/loader main.c

loader.efi: Trim ZFS searching for other booting options

When we're searching the system for all the disks in relaxed mode, we
need to do a final pass over all the non-boot disks. We no longer need
to have two loops since ZFS on boot device is selected properly in
try_boot_device_partitions. This also simplifies the code a bit.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57805
DeltaFile
+6-24stand/efi/loader/main.c
+6-241 files

FreeBSD/src 7f54755stand/efi/loader main.c

loader.efi: Improve the trying MD messsages

Expand the tring MD message a little to make it clearer.

Sponsored by:           Netflix
Differential Revision:  https://reviews.freebsd.org/D57804
DeltaFile
+1-1stand/efi/loader/main.c
+1-11 files