FreeBSD/src 9872af2usr.sbin/gstat gstat.c

gstat: Set errno = 0 before strtoul

The strtoul function sets errno on error, but does not clear it on
success; when using strtoul and checking errno (as one should) for
ERANGE / EINVAL afterwards, it's important to zero errno first.

While here, remove a dead store.

Reviewed by:    phk
Fixes:  4fe8c1b67be0 ("Add error and range checking ... ")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59270

(cherry picked from commit 6ddb10cf6b7f870d749e96d2ae55976b18896f54)
DeltaFile
+1-1usr.sbin/gstat/gstat.c
+1-11 files

FreeBSD/src bf95db1usr.sbin/gstat gstat.c

gstat: Set errno = 0 before strtoul

The strtoul function sets errno on error, but does not clear it on
success; when using strtoul and checking errno (as one should) for
ERANGE / EINVAL afterwards, it's important to zero errno first.

While here, remove a dead store.

Reviewed by:    phk
Fixes:  4fe8c1b67be0 ("Add error and range checking ... ")
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D59270

(cherry picked from commit 6ddb10cf6b7f870d749e96d2ae55976b18896f54)
DeltaFile
+1-1usr.sbin/gstat/gstat.c
+1-11 files

FreeBSD/src b712bb8sys/netinet tcp_subr.c tcp_usrreq.c

tcp: fix TCPS_CLOSED state underleak in syncache_socket()

The syncache entry holds one TCPS_SYN_RECEIVED count that normally is
transferred to the the newborn tp.  Upon failure syncache_socket() shall
not use TCPSTATES_INC/TCPSTATES_DEC (see 5050df3f4aa4 why).  But when
syncache_socket() fails in_pcbconnect(), it calls tcp_discardcb() to free
resources that were just allocated by tcp_newtcpcb() and this
tcp_discardcb() would do TCPSTATES_DEC(tp->t_state).  The t_state is
TCPS_CLOSED at this point.

Make tcp_discardcb() symmetrical to tcp_newtcpcb() - not responsible for
the TCPSTATES.  Make the caller responsible for state count book keeping.

Reviewed by:            tuexen
Fixes:                  3703e1a73e0e0367c04f47f793e46495e46e647b
Differential Revision:  https://reviews.freebsd.org/D59325
DeltaFile
+0-1sys/netinet/tcp_subr.c
+1-0sys/netinet/tcp_usrreq.c
+1-12 files

LLVM/project f9a8decllvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV and-negpow2-cmp.ll

[RISCV] Fix infinite DAGCombine loop with SETCC and SIGN_EXTEND_INREG (#221593)

We generalized (X & -(1 << C1) & 0xffffffff) == C2 << C1 using `sraiw`.
The combine generates a `SIGN_EXTEND_INREG` when simplifying.

However, when C1 is 0 and the sign bit (bit 31) of X is already known to
be zero, `DAGCombiner` sees that `SIGN_EXTEND_INREG` is semantically
equivalent to `AND X, 0xFFFFFFFF` (zext). Because `DAGCombiner`
considers `AND` to be more canonical than `SIGN_EXTEND_INREG` in this
context, it immediately reverts the node back to `AND`.

This caused an infinite DAGCombine loop. This patch disables the folding
when the C1 is zero. That case is covered by a later combine that already
checks if bit 31 is known to be zero.

Fixes: https://github.com/llvm/llvm-project/issues/221521
DeltaFile
+34-0llvm/test/CodeGen/RISCV/and-negpow2-cmp.ll
+1-1llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+35-12 files

FreeBSD/ports 799b961security/pkcs11-tools distinfo Makefile

security/pkcs11-tools: Update 3.0.0 => 3.1.0

Port Changes:
- Use distribution tarball rather than pure source code
  for prebuilt manpages instead of depending on Pandoc.

Changelog:
https://github.com/Mastercard/pkcs11-tools/blob/v3.1.0/CHANGELOG.md

PR:             297826
Approved by:    osa, vvd (Mentors, implicit)
Co-authored-by: Yusuf Yaman <nxjoseph at FreeBSD.org>
DeltaFile
+37-1security/pkcs11-tools/pkg-plist
+10-10security/pkcs11-tools/Makefile
+3-3security/pkcs11-tools/distinfo
+50-143 files

FreeBSD/src 2e16d37tests/sys/netinet udp_bindings.c

tests/netinet: test case for a jail with 2 addresses

Check that wildcard bind(2) doesn't yet select a local address, and later
connect(2) succeeds.
DeltaFile
+31-0tests/sys/netinet/udp_bindings.c
+31-01 files

FreeBSD/src 08cf959sys/netinet in_pcb.c

inpcb: use new local address in in_pcbconnect()

when collecting necessary locks for the operation.  The IPv6 version
is already correct.

Submitted by:   Nick Price <nick spun.io>
Fixes:          1dda8ba77a20d983774a3bf0e94c51c93f1d8758
DeltaFile
+1-1sys/netinet/in_pcb.c
+1-11 files

FreeBSD/ports 2540207devel/tinygo Makefile distinfo, devel/tinygo/files patch-Makefile modules.txt

devel/tinygo: Update 0.19.0 => 0.42.0, take maintainership

The port has been stuck at 0.19.0 since 2021 and was deprecated on
2026-08-08 along with the other ports pinned to Go 1.25, scheduled for
removal on 2026-09-30.  Upstream 0.42.0 supports Go 1.27 and LLVM 22, so
the pin goes away and with it the reason for the deprecation.

Upstream renamed Makefile to GNUmakefile, dropped the git rev-parse call
and ships the submodule marker files the build checks for, so
files/patch-Makefile is no longer needed at all and the port now builds
unpatched.  wasm-opt is taken from devel/binaryen rather than built from
the bundled copy, and build/release no longer produces a pkg directory.

The bundled LLVM is now a fork of llvm-project carrying the Xtensa
backend, pinned by the commit recorded in llvm-version.txt.  Keeping it
bundled rather than switching to devel/llvm22 is what makes the Xtensa
targets work, ESP32 included.

tinygo resolves GOROOT by running "go" from PATH, which the package does

    [13 lines not shown]
DeltaFile
+8,757-924devel/tinygo/pkg-plist
+260-0devel/tinygo/files/modules.txt
+117-55devel/tinygo/distinfo
+87-38devel/tinygo/Makefile
+0-57devel/tinygo/files/patch-Makefile
+9,221-1,0745 files

OPNSense/plugins fb7ef66security/q-feeds-connector/src/opnsense/scripts/qfeeds/lib api.py __init__.py, security/q-feeds-connector/src/opnsense/scripts/qfeeds/sql setup.sql

security/q-feeds-connector - add db_update action which indexes the additional feed information in sqlite, which will be executed during a regular update after fetch.
DeltaFile
+141-0security/q-feeds-connector/src/opnsense/scripts/qfeeds/lib/db.py
+32-0security/q-feeds-connector/src/opnsense/scripts/qfeeds/sql/setup.sql
+21-2security/q-feeds-connector/src/opnsense/scripts/qfeeds/lib/__init__.py
+2-4security/q-feeds-connector/src/opnsense/scripts/qfeeds/lib/api.py
+196-64 files

LLVM/project c70b9c0llvm/lib/Target/AMDGPU SIISelLowering.h AMDGPUISelLowering.h, llvm/test/CodeGen/AMDGPU frexp-inf-nan-combine.ll

[AMDGPU] Fold redundant inf/nan checks into frexp instructions (#214936)

Fixes #204204

The AMDGPU "v_frexp_exp" and "v_frexp_mant" instructions return 0 for
inf/nan inputs. This patch adds a DAG combine
("performFrexpSelectCombine") to fold redundant inf/nan checks with
frexp results, eliminating unnecessary compare and select instructions..

### Patterns folded:
  - `select (fcmp uno x, 0), 0, (frexp_exp x)` → `frexp_exp x`
  - `select (fcmp oeq |x|, inf), 0, (frexp_exp x)` → `frexp_exp x`
  - `select (fcmp ueq |x|, inf), 0, (frexp_exp x)` → `frexp_exp x`
  - `select (fcmp ord x, 0), (frexp_exp x), 0` → `frexp_exp x`
  - `select (fcmp one |x|, inf), (frexp_exp x), 0` → `frexp_exp x`
  - `select (is_fpclass x, finite), (frexp_exp x), 0` → `frexp_exp x`
  - Same patterns with `frexp_mant`

The optimization is disabled on SI (Southern Islands) which has

    [21 lines not shown]
DeltaFile
+148-253llvm/test/CodeGen/AMDGPU/frexp-inf-nan-combine.ll
+123-0llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+0-10llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+9-0llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
+1-0llvm/lib/Target/AMDGPU/SIISelLowering.h
+281-2635 files

LLVM/project 7297a1ellvm/lib/Target/XCore/Disassembler CMakeLists.txt

Fix unresolved symbol XCoreMCRegisterClassStorage (#211420)

Fix for #211419

Add missing dependency to XCoreDisAssembler's CMakeLists.txt file
DeltaFile
+1-0llvm/lib/Target/XCore/Disassembler/CMakeLists.txt
+1-01 files

LLVM/project 2bd2609clang/test/CodeGen/AArch64/sve dup.c, clang/test/OpenMP parallel_for_codegen.cpp

Rebase

Created using spr 1.3.7
DeltaFile
+1,049-1,049clang/test/OpenMP/parallel_for_codegen.cpp
+892-872llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sched.group.barrier.ll
+815-635llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+546-687llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.ll
+488-475llvm/test/CodeGen/AMDGPU/llvm.amdgcn.iglp.opt.ll
+824-0clang/test/CodeGen/AArch64/sve/dup.c
+4,614-3,718480 files not shown
+18,845-10,862486 files

FreeBSD/ports d339f7cfinance/frontaccounting Makefile, finance/frontaccounting/files patch-includes_db_inventory__db.inc patch-includes_session.inc

finance/frontaccounting: Update 2.4.12 => 2.4.20

Changelog:
https://frontaccounting.com/wbt/pages/posts/release-2.4.13-230.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.14-231.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.15-232.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.15-232.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.16-233.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.17-234.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.18-235.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.19-236.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.20-237.php

- Replaced the old FreeBSD patch that enabled the late ini_set() calls.
- Upstream corrected the assignment to $deliver_to.
- Added a port patch for PDF parser and page rotation
- Add two FPDI fixes still required in upstream 2.4.20: declare
  $actual_obj and handle missing page rotation without accessing an
  array offset on false.

    [35 lines not shown]
DeltaFile
+197-0finance/frontaccounting/files/email_template.php
+18-22finance/frontaccounting/Makefile
+30-0finance/frontaccounting/files/patch-reporting_includes_pdf__report.inc
+12-11finance/frontaccounting/files/patch-includes_session.inc
+15-8finance/frontaccounting/files/pkg-message.in
+20-0finance/frontaccounting/files/patch-includes_db_inventory__db.inc
+292-415 files not shown
+330-4811 files

FreeBSD/ports 7b541dbfinance/frontaccounting Makefile, finance/frontaccounting/files patch-includes_db_inventory__db.inc patch-includes_session.inc

finance/frontaccounting: Update 2.4.12 => 2.4.20

Changelog:
https://frontaccounting.com/wbt/pages/posts/release-2.4.13-230.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.14-231.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.15-232.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.15-232.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.16-233.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.17-234.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.18-235.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.19-236.php
https://frontaccounting.com/wbt/pages/posts/release-2.4.20-237.php

- Replaced the old FreeBSD patch that enabled the late ini_set() calls.
- Upstream corrected the assignment to $deliver_to.
- Added a port patch for PDF parser and page rotation
- Add two FPDI fixes still required in upstream 2.4.20: declare
  $actual_obj and handle missing page rotation without accessing an
  array offset on false.

    [33 lines not shown]
DeltaFile
+197-0finance/frontaccounting/files/email_template.php
+18-22finance/frontaccounting/Makefile
+30-0finance/frontaccounting/files/patch-reporting_includes_pdf__report.inc
+12-11finance/frontaccounting/files/patch-includes_session.inc
+15-8finance/frontaccounting/files/pkg-message.in
+20-0finance/frontaccounting/files/patch-includes_db_inventory__db.inc
+292-415 files not shown
+330-4811 files

LLVM/project d7b6632compiler-rt/lib/builtins comparedf2.cpp

if defined -> ifdef
DeltaFile
+4-3compiler-rt/lib/builtins/comparedf2.cpp
+4-31 files

LLVM/project 2060d76compiler-rt/lib/builtins comparedf2.cpp, libc/shared/builtins gedf2.h ledf2.h

[compiler-rt][builtins] libc-backed double-float comparison builtins
DeltaFile
+54-0compiler-rt/lib/builtins/comparedf2.cpp
+30-0libc/src/__support/builtins/gedf2.h
+30-0libc/src/__support/builtins/ledf2.h
+30-0libc/src/__support/builtins/unorddf2.h
+29-0libc/shared/builtins/gedf2.h
+29-0libc/shared/builtins/ledf2.h
+202-06 files not shown
+266-412 files

FreeBSD/src 153446esys/compat/linuxkpi/common/include/linux mm.h

linuxkpi: Add `split_page()`

This function is supposed to split large pages into an array of
`PAGE_SIZE`-sized pages, with correct refcounting. This is apparently
used to allow some drivers to free a part of a large page only.

I don't think we use large pages in linuxkpi. Therefore, this new
function is curently a no-op.

The DRM drivers TTM memory manager started to use it in Linux 6.15.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58762
DeltaFile
+6-0sys/compat/linuxkpi/common/include/linux/mm.h
+6-01 files

FreeBSD/src be6e357sys/compat/linuxkpi/common/src linux_compat.c

linuxkpi: Update `struct vm_area_struct` when an existing mapping is extended

With Mesa 26 and DRM drivers in Linux 6.13, userspace will try to extend
an existing mmap, at last push the end address further.

Before this change, the mapping was not updated, but userspace would try
to access a page after the initial end address, leading to a panic
triggered by the following assertion in `vm_fault_populate()`:

    MPASS(fs->first_pindex <= pager_last);

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58195
DeltaFile
+13-0sys/compat/linuxkpi/common/src/linux_compat.c
+13-01 files

FreeBSD/src fbc89a8sys/compat/linuxkpi/common/include/linux kthread.h

linuxkpi: Add `kthread_run_worker()`

On Linux, `kthread_run_worker()` differs from `kthread_create_worker()`
by waking up the task after creating it with `kthread_create_worker()`.

On FreeBSD, we already execute it and wait for it, so probably no need
to do anything further. Therefore, `kthread_run_worker()` is an alias to
`kthread_create_worker()`.

The DRM drivers generic code started to replace
`kthread_create_worker()` by `kthread_run_worker()` as is in Linux 6.14.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57701
DeltaFile
+11-0sys/compat/linuxkpi/common/include/linux/kthread.h
+11-01 files

FreeBSD/src 33ba607sys/compat/linuxkpi/common/include/linux kobject.h

linuxkpi: Alias `sd` field of `struct kobject`

On Linux, a `struct kernfs_node *` pointer, representing a directory in
sysfs, is kept in the `sd` struct field.

We don't have that on FreeBSD because we use sysctls instead. Let's
alias the sysctl OID pointer to `sd` using an union.

This pointer is checked by the DRM drivers using:
    if (var->kobj.sd) {
        ...
    }

The amdgpu DRM driver started to use these checks in Linux 6.13.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57586
DeltaFile
+16-1sys/compat/linuxkpi/common/include/linux/kobject.h
+16-11 files

FreeBSD/ports 1a46f75security/hpenc Makefile

security/hpenc: Mark deprecated

Approved by:    vsevolod (maintainer, via Telegram)

(cherry picked from commit b7f90450b67b11effd5e1f55e6331892d51c4522)
DeltaFile
+4-1security/hpenc/Makefile
+4-11 files

FreeBSD/ports b7f9045security/hpenc Makefile

security/hpenc: Mark deprecated

Approved by:    vsevolod (maintainer, via Telegram)
DeltaFile
+4-1security/hpenc/Makefile
+4-11 files

LLVM/project 41359e7clang/test/CodeGen/AArch64/sve dup.c, clang/test/OpenMP parallel_for_codegen.cpp

Rebase

Created using spr 1.3.7
DeltaFile
+1,049-1,049clang/test/OpenMP/parallel_for_codegen.cpp
+892-872llvm/test/CodeGen/AMDGPU/llvm.amdgcn.sched.group.barrier.ll
+839-654llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+546-687llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.ll
+488-475llvm/test/CodeGen/AMDGPU/llvm.amdgcn.iglp.opt.ll
+824-0clang/test/CodeGen/AArch64/sve/dup.c
+4,638-3,737478 files not shown
+18,852-10,873484 files

LLVM/project 0c553f5llvm/lib/Transforms/InstCombine InstCombineCasts.cpp, llvm/test/Transforms/InstCombine trunc.ll

[InstCombine] Use common flags for shl in shl/trunc fold. (#221769)

As pointed out post-commit in
https://github.com/llvm/llvm-project/pull/219443, whether the flags from
the trunc can be transferred directly to the shl depends on the involved
types: https://alive2.llvm.org/ce/z/zN_TFq

For now, just use the common flags.

PR: https://github.com/llvm/llvm-project/pull/221769
DeltaFile
+14-3llvm/test/Transforms/InstCombine/trunc.ll
+3-5llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+17-82 files

FreeBSD/ports 80739e8graphics/heimer Makefile

graphics/heimer: Fix building with CMake 4

It is already fixed upstream the proper way, so this knob is only a temporary
measure.

Approved by:    portmgr (fixit blanket)
DeltaFile
+1-0graphics/heimer/Makefile
+1-01 files

LLVM/project bceb55alibc/src/__support/builtins CMakeLists.txt

fix
DeltaFile
+18-10libc/src/__support/builtins/CMakeLists.txt
+18-101 files

LLVM/project 6a6f476libc/src/__support/builtins CMakeLists.txt

fix conflict
DeltaFile
+2-0libc/src/__support/builtins/CMakeLists.txt
+2-01 files

LLVM/project 42ff8cfcompiler-rt/lib/builtins comparesf2.cpp, libc/shared/builtins lesf2.h unordsf2.h

[compiler-rt][builtins] libc-backed single-float comparison builtins
DeltaFile
+54-0compiler-rt/lib/builtins/comparesf2.cpp
+30-0libc/src/__support/builtins/unordsf2.h
+30-0libc/src/__support/builtins/lesf2.h
+30-0libc/src/__support/builtins/gesf2.h
+29-0libc/shared/builtins/lesf2.h
+29-0libc/shared/builtins/unordsf2.h
+202-06 files not shown
+270-012 files

FreeBSD/ports fd23795www/code-server Makefile.install Makefile, www/code-server/files patch-lib_vscode_src_vs_base_node_ps.ts EXTENSIONS.md

www/code-server: Fix process listing

Split the ps(1) arguments the same way editors/vscode does; FreeBSD's
ps does not accept the combined column list, which broke the process
explorer and the process diagnostics.

Also document which extensions need a native language server on
FreeBSD and how to configure them, install the document as
EXTENSIONS.md and point to it from the install message.

Obtained from:  editors/vscode (ps.ts patch)
Sponsored by:   Netzkommune GmbH
DeltaFile
+89-0www/code-server/files/EXTENSIONS.md
+16-0www/code-server/pkg-message
+11-0www/code-server/files/patch-lib_vscode_src_vs_base_node_ps.ts
+2-2www/code-server/Makefile
+1-1www/code-server/Makefile.install
+119-35 files

LLVM/project 783dd9doffload/liboffload/API Memory.td, offload/liboffload/src OffloadImpl.cpp

[offload][omp] Manage memory allocation through liboffload

Migrate DeviceTy::allocData/deleteData off GenericPluginTy::data_alloc/
data_delete onto liboffload's olMemAlloc*/olMemFree, migrate
targetLockExplicit/targetUnlockExplicit off data_lock/data_unlock onto
olMemRegister/olMemUnregister (fixing a latent bug where these passed
the OpenMP-visible device number instead of the plugin device id), and
migrate DeviceTy::isAccessiblePtr onto a new olMemIsAccessible API
(added with a unit test) since liboffload had no equivalent for
querying accessibility of arbitrary, not-necessarily-liboffload-
allocated pointers. Removes the now-dead GenericPluginTy::data_alloc/
data_delete/data_lock/data_unlock/is_accessible_ptr wrappers and their
exports entries.
DeltaFile
+44-0offload/unittests/OffloadAPI/memory/olMemIsAccessible.cpp
+0-16offload/plugins-nextgen/common/src/PluginInterface.cpp
+15-0offload/liboffload/API/Memory.td
+14-0offload/liboffload/src/OffloadImpl.cpp
+6-1offload/libompaccsupport/device.cpp
+2-1offload/unittests/OffloadAPI/CMakeLists.txt
+81-182 files not shown
+81-228 files