FreeBSD/src 36f268eshare/man/man4 dtrace_pid.4

dtrace_pid.4: Add example "Listing Program's Function Entries"

Reviewed by:    bcr
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57515

(cherry picked from commit 7008192726a30d2d5f8ed912554cc53d7bcf9fba)
DeltaFile
+22-2share/man/man4/dtrace_pid.4
+22-21 files

FreeBSD/src 9b4b68esbin/ipfw ipfw2.c

ipfw: fix gcc warning

We use first loop only for possible needed realloc, so it is not
required to restrict end condition.

Also check realloc() return value before accessing.

This is direct commit to stable/14.

Reported by:    dim
Differential Revision:  https://reviews.freebsd.org/D56616
DeltaFile
+2-2sbin/ipfw/ipfw2.c
+2-21 files

FreeBSD/src 9c78088. README.md NEWS

atf: import atf-0.26

This change imports 0.26 release content from [upstream][1].

The atf-0.26 artifact was been verified by [SHA256 checksum][2].

This update pulls in a large number of memory management fixes, polished upstreamed
content from contrib/atf in FreeBSD (proper), etc.

Please note that this new version requires a C++-20 compatible toolchain
to build.

More information about the release (from a high level) can be found in
the [release notes][3].

Updated via [`update_atf.sh`][4] using `update_atf.sh 0.26 atf-0.26`.

1: https://github.com/freebsd/atf/releases/download/atf-0.26/atf-0.26.tar.gz
2: https://github.com/freebsd/atf/releases/download/atf-0.26/atf-0.26.tar.gz.sha256

    [2 lines not shown]
DeltaFile
+12-3NEWS
+1-1README.md
+13-42 files

FreeBSD/src 9def2eatests/sys/kern unix_stream.c

tests/sys/kern/unix_stream: fix bad assertion

kqueue returns a value != -1 on error. Test for that instead of any
non-zero value to confirm that success was achieved when calling
`kqueue`.

This issue exists with ATF 0.22+ [1].

MFC after:      2 weeks
Reported by:    clang (-Wparenthesis)

[1]: https://github.com/freebsd/atf/pull/72

(cherry picked from commit 4881c7a650571eeb4cd89b5af4c1d3e922a67706)
DeltaFile
+2-1tests/sys/kern/unix_stream.c
+2-11 files

FreeBSD/src c68b38flib/libarchive/tests Makefile

lib/libarchive/tests/Makefile: minor fixes

- Remove trailing whitespace
- Fix typo with variable referenced adding sources for `test_fuzz`.

MFC after:      2 weeks

(cherry picked from commit edbb2e9d7a9aba7194dd0f37cede7aea51408f74)
DeltaFile
+18-17lib/libarchive/tests/Makefile
+18-171 files

FreeBSD/src 0e0a2d2tests/sys/sys bitstring_test.c

tests/sys/sys/bitstring_test: fix build with ATF 0.22+

Do not assign `b` in the `ATF_REQUIRE` macro. Set and test `b`
separately to avoid the issue cited by clang++/g++ after
implementing the change referenced in [1].

MFC after:      2 weeks
Reported by:    clang (-Wparenthesis)
Reference:      https://github.com/freebsd/atf/pull/72

(cherry picked from commit 4ae95fe823c0ec8b0b93ed27192bfc91058d9a6b)
DeltaFile
+2-1tests/sys/sys/bitstring_test.c
+2-11 files

FreeBSD/src d1fb660tests/sys/kern ktls_test.c

tests/sys/kern/ktls_test: fix -Wsign-compare issue

Cast the size_t quantity used in a comparison to off_t to mute a
`-Wsign-compare` complaint that now occurs after ATF 0.22 [1].

MFC after:      2 weeks
Reported by:    clang
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D59285
[1]: https://github.com/freebsd/atf/pull/72

(cherry picked from commit 505103215ee2e3e31d233b952633e5697ac5da5f)
DeltaFile
+1-1tests/sys/kern/ktls_test.c
+1-11 files

FreeBSD/src 97ff0d6lib/libc/tests/stdlib qsort_bench.c

Assign and test `malloc` result separately

The previous pattern is cited as an issue with ATF 0.22+ when using
clang/gcc after [1].

MFC after:      2 weeks
Reported by:    clang (-Wparenthesis)
Differential Revision:  https://reviews.freebsd.org/D59274

[1]: https://github.com/freebsd/atf/pull/72

(cherry picked from commit 2561c468c11309fbc0a097d3f4fcf0bd3bf28b8f)
DeltaFile
+1-1lib/libc/tests/stdlib/qsort_bench.c
+1-11 files

FreeBSD/src 5936c0atests/sys/kern Makefile

tty_pts: reduce/correct libatf-c linkage

ATF_TESTS_C automatically adds the appropriate library to LDADD --
there's no need to manually append the same library.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59411

(cherry picked from commit 5b10c3c3e3d5125e09e35cd607d15a546d5ad581)
DeltaFile
+1-2tests/sys/kern/Makefile
+1-21 files

FreeBSD/src f3cdf3dlib/libc/tests/stdlib qsort_bench.c

Assign and test `malloc` result separately

The previous pattern is cited as an issue with ATF 0.22+ when using
clang/gcc after [1].

MFC after:      2 weeks
Reported by:    clang (-Wparenthesis)
Differential Revision:  https://reviews.freebsd.org/D59274

[1]: https://github.com/freebsd/atf/pull/72

(cherry picked from commit 2561c468c11309fbc0a097d3f4fcf0bd3bf28b8f)
DeltaFile
+1-1lib/libc/tests/stdlib/qsort_bench.c
+1-11 files

FreeBSD/src f9c5a73tests/sys/kern ktls_test.c

tests/sys/kern/ktls_test: fix -Wsign-compare issue

Cast the size_t quantity used in a comparison to off_t to mute a
`-Wsign-compare` complaint that now occurs after ATF 0.22 [1].

MFC after:      2 weeks
Reported by:    clang
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D59285
[1]: https://github.com/freebsd/atf/pull/72

(cherry picked from commit 505103215ee2e3e31d233b952633e5697ac5da5f)
DeltaFile
+1-1tests/sys/kern/ktls_test.c
+1-11 files

FreeBSD/src a8b30aflib/libarchive/tests Makefile

lib/libarchive/tests/Makefile: minor fixes

- Remove trailing whitespace
- Fix typo with variable referenced adding sources for `test_fuzz`.

MFC after:      2 weeks

(cherry picked from commit edbb2e9d7a9aba7194dd0f37cede7aea51408f74)
DeltaFile
+18-17lib/libarchive/tests/Makefile
+18-171 files

FreeBSD/src 56b9c37tests/sys/sys bitstring_test.c

tests/sys/sys/bitstring_test: fix build with ATF 0.22+

Do not assign `b` in the `ATF_REQUIRE` macro. Set and test `b`
separately to avoid the issue cited by clang++/g++ after
implementing the change referenced in [1].

MFC after:      2 weeks
Reported by:    clang (-Wparenthesis)
Reference:      https://github.com/freebsd/atf/pull/72

(cherry picked from commit 4ae95fe823c0ec8b0b93ed27192bfc91058d9a6b)
DeltaFile
+2-1tests/sys/sys/bitstring_test.c
+2-11 files

FreeBSD/src 343618ctests/sys/kern Makefile

tty_pts: reduce/correct libatf-c linkage

ATF_TESTS_C automatically adds the appropriate library to LDADD --
there's no need to manually append the same library.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59411

(cherry picked from commit 5b10c3c3e3d5125e09e35cd607d15a546d5ad581)
DeltaFile
+1-2tests/sys/kern/Makefile
+1-21 files

FreeBSD/src 6f34450contrib/netbsd-tests/lib/libc/gen t_assert.c

[tests] lib/libc/gen:assert_test: skip tests when NDEBUG set

In the event that NDEBUG is specified in CFLAGS--which is most likely
triggered via `MK_ASSERT_DEBUG` == "no" -- all assert(3) statements are
optimized out by design. This breaks the assert(3) tests as they
specifically rely on assert(3) actually raising a `SIGABRT` instead of
quietly succeeding.

Skip both tests if `NDEBUG` is set. There's no sense running the
`assert(true)` test if the result could instead be a false positive.

MFC after:      2 weeks
DeltaFile
+20-0contrib/netbsd-tests/lib/libc/gen/t_assert.c
+20-01 files

FreeBSD/src 14b855dcontrib/mandoc st.c mdoc.7, lib/msun/man tanpi.3 sinpi.3

mandoc: Drop -ieee754-2008 abbreviation

Improve manpage compatability by dropping an abbreviation macro that
compiler upstreams do not want, causing manuals using it to render
incorrectly on other toolchains or operating systems. It was only used
in three manuals, which are amended in this commit.

Reviewed by:    fuz, markj
MFC after:      no, these did not MFC
Requested by:   Ingo Schwarze <schwarze at openbsd.org>
Fixes:          db3884b03989 ("contrib/mandoc: add -ieee754-2008")
Fixes:          63cd0841de76 ("document .St -ieee754-2008 in mdoc")
Differential Revision:  https://reviews.freebsd.org/D59880
DeltaFile
+0-5contrib/mandoc/mdoc.7
+1-1lib/msun/man/tanpi.3
+1-1lib/msun/man/sinpi.3
+1-1lib/msun/man/cospi.3
+0-1contrib/mandoc/st.c
+3-95 files

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

src.conf(5): regenerate after f6db138f97b7

MFC after:      2 weeks
MFC with:       f6db138f97b7 ("src.opts.mk: force the Dtrace tests ...")
DeltaFile
+5-1share/man/man5/src.conf.5
+5-11 files

FreeBSD/src df6131etools/build/mk OptionalObsoleteFiles.inc

Remove CDDL and ctfconvert tests when their controlling knobs are disabled

In the event someone specified MK_CDDL == no prior to this change, all
tests under `/usr/tests/cddl` would stick around after the change,
resulting in errors. Similarly, MK_DTRACE == no removed ctfconvert,
which the ctfconvert tests relied on (but remained around after the knob
was disabled).

Remove the tests under the respective blocks now so they don't linger
around on systems where these knobs are disabled, resulting in false
positives when running the complete test suite.

The ctfconvert tests weren't specifically put under
`${MK_DTRACE_TESTS}` == no because ctfconvert was bundled separately
from the upstream provided Dtrace test suite.

MFC after:      2 weeks
MFC with:       30c20ca26 ("Remove Dtrace/ZFS tests if their knobs are disabled")
DeltaFile
+22-0tools/build/mk/OptionalObsoleteFiles.inc
+22-01 files

FreeBSD/src f6db138share/mk src.opts.mk

src.opts.mk: force the Dtrace tests off if ${MK_DTRACE} == no

Prior to this change Dtrace's tests could be enabled even if
`${MK_DTRACE}` == no. Allowing this doesn't make sense so remove the
tests if `${MK_DTRACE}` is also disabled.

MFC after:      2 weeks
DeltaFile
+1-0share/mk/src.opts.mk
+1-01 files

FreeBSD/src 04fcf30sbin/ipfw dummynet.c

dummynet: do not overflow the points[ED_MAX_SAMPLES_NO] array

Otherwise, the following would segfault

dnctl pipe 1 config bw 1Mbit/s profile 1025points.txt

Found with:     Claude Code Sonnet 5
MFC after:      2 weeks
DeltaFile
+3-0sbin/ipfw/dummynet.c
+3-01 files

FreeBSD/src 30c20catools/build/mk OptionalObsoleteFiles.inc

Remove Dtrace/ZFS tests if their knobs are disabled

Prior to this change, Dtrace and ZFS tests and their respective
directories would remain installed even if `${MK_DTRACE_TESTS}` == no or
`${MK_ZFS_TESTS}` == no.

This change enhances the logic to remove the tests when the respective
knobs are disabled so the tests will be removed when `make delete-old`
is run.

MFC after:      2 weeks
DeltaFile
+25-0tools/build/mk/OptionalObsoleteFiles.inc
+25-01 files

FreeBSD/src 5a2328arelease/tools vmimage.subr

vmimage.subr: Include dangling symlinks in images

When creating VM images, we filter the METALOG file created by pkg(8)
when installing non-base packages, rejecting any lines which correspond
to files which don't exist; this solves a problem which arose when a
package was installed and then deinstalled (or upgraded) later in the
image-building process.

Unfortunately [ -e ... ] follows symlinks and is not basedir-aware, so
an absolute symlink which is valid *inside* the image is omitted from
the image if it points to something which isn't present in the build
host system.

Replace [ -e ... ] with [ -e ... ] || [ -L ... ] so that symlinks are
included even if dangling.

While I'm here, add quoting in case future paths become problematic.

Sponsored by:   Amazon
MFC after:      3 days
DeltaFile
+2-1release/tools/vmimage.subr
+2-11 files

FreeBSD/src 8a0cab2sys/dev/hwpmc hwpmc_amd.h hwpmc_amd.c

hwpmc/amd: replace static pmcdesc[] and pc_amdpmcs[] with dynamic allocation

AMD_NPMCS_MAX = 342 (16 core + 6 L3 + 64 DF + 256 UMC). On a Zen 4
EPYC 9654 with 6 core, 6 L3, 16 DF, and 4 UMC counters, only 32
descriptors are needed; the static arrays over-allocate by ~10x.

Replace both amd_pmcdesc[AMD_NPMCS_MAX] and per-CPU pc_amdpmcs[AMD_NPMCS_MAX]
with mallocarray() sized to the actual registered PMC count:
  - amd_pmcdesc: allocated in pmc_amd_initialize()
  - pc_amdpmcs:  allocated per-CPU in amd_pcpu_init(), freed in fini()

Normalize amd_l3_npmcs and amd_df_npmcs against the AMDID2_PTSCEL2I
and AMDID2_PNXC feature bits before computing npmcs_total, so that
allocation, registration, and amd_get_msr() row offsets are all derived
from the same values.  Previously the ternary in npmcs_total excluded
L3/DF from the allocation while the globals retained their defaults,
causing amd_get_msr() to miscompute DF row offsets when L3 is absent.

amd_umc_npmcs comes from CPUID Fn8000_0022h EBX[23:16] (NumUMCCounters)

    [14 lines not shown]
DeltaFile
+41-2sys/dev/hwpmc/hwpmc_amd.c
+2-1sys/dev/hwpmc/hwpmc_amd.h
+43-32 files

FreeBSD/src c745fccsys/riscv/conf GENERIC

riscv: enable gpiopower driver

It is functional, and there are some RISC-V platforms which can benefit
from it.

Requested by:   Brian Scott <bscott at bunyatech.com.au>
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0sys/riscv/conf/GENERIC
+1-01 files

FreeBSD/src e676978sys/dev/eqos if_eqos.c

eqos: Reduce RX error noisiness

Reduce very common console messages:
        Receive error rdes3=30208000

As observed on the VisionFive v2 hardware after some large transfers.

Differentiate between overflow errors and others. Report the errors when
the length is non-zero (overflow errors).

Also, count errors for netstat purposes.

Reviewed by:    mhorne
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59479
DeltaFile
+9-1sys/dev/eqos/if_eqos.c
+9-11 files

FreeBSD/src 9257ae7. MAINTAINERS, .github CODEOWNERS

Add entries for third-party projects I maintain

Add myself formally as the "maintainer" for atf, kyua, and lutok, both
in the GitHub CODEOWNERS and MAINTAINERS files.

This change matches the herald rules I recently setup for these
third-party components.
DeltaFile
+2-0MAINTAINERS
+2-0.github/CODEOWNERS
+4-02 files

FreeBSD/src b952821share/man/man4 ulpt.4

ulpt.4: Canonicalize SYNOPSIS, tag SPDX

MFC after:      3 days
DeltaFile
+6-11share/man/man4/ulpt.4
+6-111 files

FreeBSD/src 2784767share/man/man4 umct.4

umct.4: Canonicalize SYNOPSIS, HARDWARE, tag SPDX

MFC after:      3 days
DeltaFile
+8-14share/man/man4/umct.4
+8-141 files

FreeBSD/src 71a0ea7share/man/man4 umcs.4

umcs.4: Describe better, canonicalize SYNOPSIS

+ tag SPDX
+ improve apropos and hardware notes context
+ canonicalize SYNOPSIS

MFC after:      3 days
DeltaFile
+13-18share/man/man4/umcs.4
+13-181 files

FreeBSD/src 6204c60share/man/man4 uled.4

uled.4: Canonicalize SYNOPSIS, tag SPDX

MFC after:      3 days
DeltaFile
+6-11share/man/man4/uled.4
+6-111 files