FreeNAS/freenas 236909asrc/middlewared/middlewared/alert/source smart.py, tests/unit test_smart_alert.py

NAS-140652 / 25.10.6 / fix nvme self-test error alert (buggy firmware) (by yocalebo) (by bugclerk) (#19442)

## Summary

Fix `parse_nvme_smart_info` in the SMART alert source to select the
newest
NVMe self-test log entry and to tolerate sparse gaps in the table,
eliminating transient false `"failed a SMART selftest"` alerts that
appear
and self-clear every 90 minutes (the alert's poll cadence).

## Root Cause

`parse_nvme_smart_info` used `table[-1]` while naming the variable
`latest_entry`, but `[-1]` is the *last* (oldest) element, not the
newest.
Per the NVMe specification, the Device Self-Test Log (Log 0x06) stores
result entries in reverse chronological order — **index `0` is the most
recent test.** Using `[-1]` meant the alert was actually evaluating the

    [94 lines not shown]
DeltaFile
+129-0tests/unit/test_smart_alert.py
+10-4src/middlewared/middlewared/alert/source/smart.py
+139-42 files

NetBSD/src VaqKmWjsys/arch/arm/ti ti_motgphy.c

   Fix some whitespace issues noted by Brook
VersionDeltaFile
1.2+28-28sys/arch/arm/ti/ti_motgphy.c
+28-281 files

FreeNAS/freenas 39e29b4src/middlewared/middlewared/api/v26_0_0 service.py

Export ServiceOptions from the v26_0_0 API module

## Problem
`plugins/smb_/sid.py` imports `ServiceOptions` from `middlewared.api.current`, but `api/v26_0_0/service.py` defines the class without listing it in `__all__`. Since `v26_0_0/__init__.py` pulls the module in with `from .service import *`, the name never gets rebound and the import raises `ImportError` at plugin load. `load_modules` doesn't guard `importlib.import_module`, so this is fatal — middlewared won't start. It only shows up on 26 because master's `api/current.py` points at `v27_0_0`, whose `__all__` does export the name.

## Solution
Added `ServiceOptions` to `v26_0_0/service.py`'s `__all__`, matching v27. An AST sweep of every name imported from `middlewared.api.current` across the tree confirms this was the only one missing from v26's exports, so nothing else is queued behind it. `ServiceUpdate` is also unexported relative to v27, but nothing imports it through `api.current`, so I left it alone.

(cherry picked from commit 5357bc0b4642706aeb547ced9deea93d4553a835)
DeltaFile
+2-1src/middlewared/middlewared/api/v26_0_0/service.py
+2-11 files

LLVM/project be76618lldb/source/Core IOHandler.cpp

[lldb][Windows] Check for EOF before the ctrl-c retry in GetLine (#212745)

On Windows `lldb --repl` can hang forever instead of exiting at EOF.

`IOHandlerEditline::GetLine` checks `GetLastError() ==
ERROR_OPERATION_ABORTED` and does a `continue` before checking `feof`.
However `fgets` is a CRT function and does not set the Win32 last error
value, so the `GetLastError` read is not the expected error. When it
happens to be `ERROR_OPERATION_ABORTED` (995) the loop never reaches the
EOF check.

This reorders the checks so EOF wins unconditionally, and adds
`clearerr` before the ctrl-c retry (a real interrupt leaves the error
flag set, which would fail the next `fgets`). ctrl-c handling is
otherwise unchanged.

rdar://183335061
DeltaFile
+16-15lldb/source/Core/IOHandler.cpp
+16-151 files

FreeNAS/freenas b7743b6tests/unit test_smb_set_system_sid.py test_kerberos_check_updated_keytab.py

Fix broken unit tests

This commit fixes some broken unit tests for directory services.

(cherry picked from commit be58d39c03ff542324740a9dc2a978ba7fe909cf)
DeltaFile
+4-4tests/unit/test_kerberos_check_updated_keytab.py
+0-1tests/unit/test_smb_set_system_sid.py
+4-52 files

FreeNAS/freenas 28ae69ftests/unit test_smb_set_system_sid.py test_kerberos_check_updated_keytab.py

Fix broken unit tests

This commit fixes some broken unit tests for directory services.

(cherry picked from commit be58d39c03ff542324740a9dc2a978ba7fe909cf)
DeltaFile
+4-4tests/unit/test_kerberos_check_updated_keytab.py
+0-1tests/unit/test_smb_set_system_sid.py
+4-52 files

FreeNAS/freenas 4311f48tests/unit test_smb_set_system_sid.py test_kerberos_check_updated_keytab.py

NAS-141996 / 27.0.0-BETA.1 / Fix broken unit tests (#19438)

This commit fixes some broken unit tests for directory services.
DeltaFile
+4-4tests/unit/test_kerberos_check_updated_keytab.py
+0-1tests/unit/test_smb_set_system_sid.py
+4-52 files

FreeBSD/ports 2be4f0ccad/openvsp Makefile distinfo

cad/openvsp: Update to 3.51.2

ChangeLog:
https://openvsp.org/blogs/announcements/2026/07/26/openvsp-3-51-2-released

Features:

 * More AI assisted profile guided optimization, mostly in CFDMesh
 * Bogie interaction routines added to API
 * MakeMeshGeom added to API

Build System:

 * Update Code-Eli with some speedups

Fixes:

 * Fix locking for APIShow/HideScreenHandler
 * Fix AR of API driven screenshots

    [3 lines not shown]
DeltaFile
+3-3cad/openvsp/distinfo
+1-1cad/openvsp/Makefile
+4-42 files

LLVM/project 705aa2allvm/lib/Transforms/Scalar JumpThreading.cpp, llvm/test/Transforms/JumpThreading phi-copy-to-pred.ll dup-cond-br-recursive-phi.ll

[JumpThreading] Materialize PHIs in duplicateCondBranchOnPHIIntoPred (#204859)

In duplicateCondBranchOnPHIIntoPred, updateSSA iteratively updates the
uses of
the instructions of BB (the duplicated block) according to ValueMapping.
For
PHIs, however, the mapping is inconsistent: the keys refer to the values
before
the parallel assignment of the PHIs, while the mapped-to values refer to
the
values after it. E.g.

  BB:
    %arr  = phi [ %ov.0, %PredBB ], ...
    %ov.0 = phi [ %ov.sel, %PredBB ], ...
  --->
    %arr  => %ov.0
    %ov.0 => %ov.sel


    [24 lines not shown]
DeltaFile
+19-10llvm/lib/Transforms/Scalar/JumpThreading.cpp
+29-0llvm/test/Transforms/JumpThreading/dup-cond-br-recursive-phi.ll
+23-0llvm/test/Transforms/JumpThreading/phi-copy-to-pred.ll
+71-103 files

NetBSD/pkgsrc S7EGakIdoc CHANGES-2026

   doc: Updated net/tailscale to 1.98.10
VersionDeltaFile
1.4829+2-1doc/CHANGES-2026
+2-11 files

NetBSD/pkgsrc HuFGn1fnet/tailscale Makefile go-modules.mk

   tailscale: update to 1.98.10

   - Tailscale SSH Unix socket forwarding respects symlink permissions
   - Tailscale SSH preforms additional checks to disallow UIDs and
     numeric-only usernames
VersionDeltaFile
1.9+64-64net/tailscale/distinfo
1.5+21-21net/tailscale/go-modules.mk
1.26+3-3net/tailscale/Makefile
+88-883 files

LLVM/project 1c1a067llvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel legalize-merge-values.mir fp-int-conversions.ll

GlobalISel: Fix lowerMergeValues when dst type is float

Lowering is done in the integer domain. Similar to the type
mismatch when dst is a pointer, make a bitcast when dst is float.
DeltaFile
+37-0llvm/test/CodeGen/AMDGPU/GlobalISel/fp-int-conversions.ll
+28-0llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-merge-values.mir
+2-0llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+67-03 files

LLVM/project 196b4b6libcxx/include/__algorithm pstl.h, libcxx/include/__pstl backend_fwd.h

[libc++][pstl] Implementation of a parallel std::adjacent_find() based on std::mismatch() (#210604)

This PR implements a parallel `std::adjacent_find()` based on parallel
`std::mismatch`. The implementation reshapes the input range as two ranges
offset by 1 element and asks `std::mismatch` to find the first equal pair.

Part of #99938.
DeltaFile
+134-0libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/pstl.adjacent_find_pred.pass.cpp
+126-0libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/pstl.adjacent_find.pass.cpp
+45-0libcxx/include/__pstl/backends/default.h
+25-0libcxx/include/__algorithm/pstl.h
+12-0libcxx/test/std/algorithms/pstl.exception_handling.pass.cpp
+7-0libcxx/include/__pstl/backend_fwd.h
+349-02 files not shown
+359-08 files

LLVM/project b60f5e3llvm/lib/Target/AMDGPU/Disassembler AMDGPUDisassembler.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.cpp

AMDGPU: Remove xnack and sramecc subtarget features

Now that these are controlled by module flags, the subtarget
features were just used for assembler and disassembler controls.
Now that the assembler and disassembler can infer these from
the e_flags and target directives, they are no longer necessary.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+26-70llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+38-24llvm/test/MC/AMDGPU/amdgcn-target-directive-conflict.s
+44-14llvm/test/MC/AMDGPU/amdgcn_target_directive_from_eflags.s
+29-8llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+16-12llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx10.s
+20-6llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+173-13421 files not shown
+259-22527 files

LLVM/project b982bfellvm/lib/Target/AMDGPU/Disassembler AMDGPUDisassembler.h AMDGPUDisassembler.cpp, llvm/test/tools/llvm-objdump/ELF/AMDGPU kd-gfx12.s kd-gfx11.s

AMDGPU: Only disassemble .amdhsa_reserve_xnack_mask on xnack targets

The disassembler unconditionally printed .amdhsa_reserve_xnack_mask when
emitting a kernel descriptor. Targets that do not support xnack have no
xnack mask to reserve, and the assembler streamer already only emits the
directive when the subtarget supports xnack. Match that behavior in the
disassembler so the round-trip is consistent and gfx11/gfx12 descriptors
no longer carry a spurious directive.

As a guard against a malformed binary, if the object's ELF e_flags
erroneously select xnack "on" for a target that does not support xnack,
still print the directive so the invalid state remains visible in the
disassembly rather than being silently dropped.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+55-0llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-xnack-unsupported-eflags.yaml
+10-4llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+0-4llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx11.s
+3-0llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h
+0-2llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx12.s
+68-105 files

FreeNAS/freenas b5ae7e6src/middlewared/middlewared/plugins/container lifecycle.py, src/middlewared/middlewared/plugins/failover_ event.py

Migrate legacy containers on HA systems

## Problem
The `system.ready` handler that triggers the incus->container migration returns early on failover-licensed systems, since the failover event plugin owns starting containers there. That path only starts them, it never migrates, so legacy incus containers on an HA pair are never brought across - and `.ix-virt` is no longer hidden or delete-guarded, so they are one dataset deletion away from being destroyed.

## Solution
Move the migrate-then-start ordering into a shared private method and call it from both the `system.ready` path and the failover path, so the two cannot drift apart again.
DeltaFile
+12-6src/middlewared/middlewared/plugins/container/lifecycle.py
+1-1src/middlewared/middlewared/plugins/failover_/event.py
+13-72 files

FreeNAS/freenas 3a9fe31src/middlewared/middlewared/plugins/container migrate.py

Leave the legacy datasets as the migration found them

## Problem
Two loose ends in the migration's clean-up. Migrating a pool gives `<pool>/.ix-virt` and `<pool>/.ix-virt/containers` an inherited mountpoint so their children can be mounted and never puts it back, permanently promoting the legacy tree into `/mnt/<pool>/.ix-virt` even on a run where nothing was migrated - incus had both at `mountpoint=legacy`, i.e. never mounted. And when a skipped container's own mount properties cannot be restored, that is reported only in the middleware log, while every other per-container outcome goes to the job log the user actually reads.

## Solution
Restore `mountpoint=legacy` on both parents once a pool has been processed, children first so the parent is not unmounted out from under one of them; a failure there is logged and does not fail the migration. Pass the job into the per-container revert so its two failure paths are reported in the job log as well.
DeltaFile
+27-2src/middlewared/middlewared/plugins/container/migrate.py
+27-21 files

FreeNAS/freenas 6d2ab81src/middlewared/middlewared/plugins/container migrate.py

Move a container back when its database row cannot be created

## Problem
The migration renames a container's dataset into `.truenas_containers` and only then creates its database row. If anything in between fails, the dataset is left where nothing can reach it: the migration only ever scans `.ix-virt`, and the native tree is hidden from dataset queries and refuses deletion - so the container is invisible in the UI, cannot be removed, and its name cannot be reused.

## Solution
Track whether the rename happened and whether the row was created. On failure move the dataset back into `.ix-virt` and re-arm the mount-property revert, so a container that could not be migrated is left exactly as it was found. A failure after the row exists is left alone, since the container is real at that point.
DeltaFile
+18-0src/middlewared/middlewared/plugins/container/migrate.py
+18-01 files

FreeNAS/freenas 270827bsrc/middlewared/middlewared/api/v26_0_0 container.py, src/middlewared/middlewared/migration 0020_repair_incus_clone_origins.py

Relocate migrated container origins out of legacy .ix-virt

## Problem
Incus containers are ZFS clones of an image snapshot. The incus->container auto-migration relocated each container from `<pool>/.ix-virt/containers/<name>` to `<pool>/.truenas_containers/containers/<name>` with a bare `zfs rename` and did nothing else. A `zfs rename` does not change a clone's `origin`, so a migrated container stayed a clone of a snapshot still living inside `.ix-virt`. `.ix-virt` was visible in the UI and not delete-guarded, so deleting it recursively destroyed those origin snapshots and cascaded into the dependent migrated clones — silently destroying migrated containers.

## Solution
Relocate each container's origin image dataset out of `.ix-virt` before renaming the container, so no migrated container depends on anything under `.ix-virt`. Once relocated the image stays put for good, exactly like a natively pulled one — reclaiming either is the job of the `container.image.*` management API landing separately in this release, not of this fix.

- **Shared relocation helper** — `container.relocate_container_origin` reads a container's live `origin`; if it points at an image under `.ix-virt/images` or `.ix-virt/deleted/images`, it sets `canmount=noauto` on that image dataset and then renames it into the native `.truenas_containers/images/` tree. The rename goes last so it is the single atomic commit point: the image is either wholly still in `.ix-virt` or wholly relocated, never half-way, and the helper's return value describes reality. All fan-out clones auto-repoint on the rename; an origin already outside `.ix-virt` is left alone; a relocation failure leaves the container wholly inside `.ix-virt` (best-effort, skip).
- **Migration path** — the incus->container migration calls the helper immediately before renaming each container, and skips any container whose base image cannot be relocated.
- **Repair migration** — new `0020_repair_incus_clone_origins` runs the same relocation over existing `container.container` rows for systems that already ran the old migration.
- **Delete guard** — `.truenas_containers` is added to `INTERNAL_PATHS` so it cannot be deleted out from under running containers; the plugin's own snapshot/clone/destroy calls that touch it now pass `bypass=True`.
- **Safer deletion** — `do_delete` destroys the dataset first (recursively, matching the apps stack, so a container that has snapshots is deletable) and removes the database and libvirt records only once the dataset is confirmed gone, so a failed destroy never orphans the dataset with no row pointing at it; an already-missing dataset is tolerated so a container whose data was lost to the old cascade can still be removed cleanly.
- **Active-instance guards** — deleting or renaming a container that is not stopped (running or suspended) is refused; delete additionally accepts `force=True`, which stops it first, mirroring the VM delete flow. The container status model now includes the `SUSPENDED` state it can actually report.
- **Delete locking** — delete becomes a job so it can stop the container and wait on the destroy, and its lock is keyed per container id: a constant lock string would hit `@job`'s default `lock_queue_size` of 5 and, past five queued deletes, silently fold a new request into a queued delete of a *different* container and hand that job back to the caller, who would then see SUCCESS for a container nobody deleted.
DeltaFile
+103-0src/middlewared/middlewared/plugins/container/migrate.py
+43-8src/middlewared/middlewared/plugins/container/container.py
+41-0src/middlewared/middlewared/migration/0020_repair_incus_clone_origins.py
+34-1tests/api2/test_container.py
+11-1src/middlewared/middlewared/api/v26_0_0/container.py
+5-3src/middlewared/middlewared/test/integration/assets/container.py
+237-132 files not shown
+243-178 files

FreeNAS/freenas f9b6b1csrc/middlewared/middlewared/plugins/container migrate.py

Arm the mount-property revert before the properties are changed

## Problem
The migration mounts each legacy container to read its manifest, which means replacing the `canmount`/`mountpoint` pair incus set, and a `finally` restores them for any container that is not migrated. The flag guarding that restore was only set once the mount had succeeded, so a failure part-way through the property update - `canmount` applied, `mountpoint` not - left the dataset changed with nothing left to change it back.

## Solution
Set the flag before the properties are touched rather than after the mount.
DeltaFile
+3-1src/middlewared/middlewared/plugins/container/migrate.py
+3-11 files

FreeNAS/freenas 2bdc78bsrc/middlewared/middlewared/plugins/container migrate.py

Do not migrate a container which is a clone of another container
DeltaFile
+16-1src/middlewared/middlewared/plugins/container/migrate.py
+16-11 files

FreeNAS/freenas bfcbeeasrc/middlewared/middlewared/migration 0020_repair_incus_clone_origins.py, src/middlewared/middlewared/plugins/container migrate.py

Always restore the legacy parent mountpoints

## Problem
Two paths leave `<pool>/.ix-virt` with an inherited mountpoint, which keeps the whole legacy tree mounted under `/mnt` and remounted on every boot with nothing managing it. `processed_parents_mountpoints` is only set once both parent updates have succeeded, so a failure on the second one skips the restore at the end of the run entirely. Separately, a system that migrated on an older build never got the restore in the first place.

## Solution
Arm the flag before the properties are changed, the same way the per-container revert already is, so a partial apply is undone too. Have the repair migration call `container.restore_legacy_parent_mountpoints` for every pool it still finds a legacy tree on: the children inherit their mountpoint from `.ix-virt`, so putting the parents back unmounts the tree and keeps it unmounted across a pool import. Pools that are not imported, and trees that are already gone, are skipped rather than logging a failure per dataset.
DeltaFile
+32-10src/middlewared/middlewared/migration/0020_repair_incus_clone_origins.py
+5-1src/middlewared/middlewared/plugins/container/migrate.py
+37-112 files

FreeNAS/freenas 7c6dc86src/middlewared/middlewared/api/v26_0_0 container.py

Fix docstring
DeltaFile
+3-1src/middlewared/middlewared/api/v26_0_0/container.py
+3-11 files

FreeNAS/freenas 11c3a0fsrc/middlewared/middlewared/plugins/container migrate.py

Record containers created during the migration

## Problem
The set of existing container names is built once before the storage pools are walked, so a container the migration itself creates is never added to it. Two legacy containers with the same name in different pools therefore both proceed, and the second one fails validation after its dataset has already been renamed.

## Solution
Add each container to the set as it is created, so a later pool skips the name instead of failing on it.
DeltaFile
+1-0src/middlewared/middlewared/plugins/container/migrate.py
+1-01 files

FreeNAS/freenas 8a174a2src/middlewared/middlewared/plugins/container migrate.py

Do not run migration if system is not licensed for containers
DeltaFile
+17-0src/middlewared/middlewared/plugins/container/migrate.py
+17-01 files

FreeNAS/freenas 50ed996src/middlewared/middlewared/plugins/container migrate.py

Fix relocation
DeltaFile
+55-14src/middlewared/middlewared/plugins/container/migrate.py
+55-141 files

FreeNAS/freenas 2a0a626src/middlewared/middlewared/plugins/container migrate.py

Keep migrating the remaining pools when one fails

## Problem
`container.migrate` walks the legacy storage pools with no error handling around each one, so a pool that cannot be prepared - locked, exported, out of space - aborts the whole job and every pool after it is left unmigrated. Which pools those are is arbitrary, since the pool set has no meaningful iteration order.

## Solution
Wrap each per-pool call, record the failure in both the job log and the middleware log, and carry on with the next pool.
DeltaFile
+10-1src/middlewared/middlewared/plugins/container/migrate.py
+10-11 files

FreeNAS/freenas be58d39tests/unit test_smb_set_system_sid.py test_kerberos_check_updated_keytab.py

Fix broken unit tests

This commit fixes some broken unit tests for directory services.
DeltaFile
+4-4tests/unit/test_kerberos_check_updated_keytab.py
+0-1tests/unit/test_smb_set_system_sid.py
+4-52 files

LLVM/project 689c9eellvm/lib/Target/AMDGPU/Disassembler AMDGPUDisassembler.h AMDGPUDisassembler.cpp, llvm/test/tools/llvm-objdump/ELF/AMDGPU kd-gfx12.s kd-gfx11.s

AMDGPU: Only disassemble .amdhsa_reserve_xnack_mask on xnack targets

The disassembler unconditionally printed .amdhsa_reserve_xnack_mask when
emitting a kernel descriptor. Targets that do not support xnack have no
xnack mask to reserve, and the assembler streamer already only emits the
directive when the subtarget supports xnack. Match that behavior in the
disassembler so the round-trip is consistent and gfx11/gfx12 descriptors
no longer carry a spurious directive.

As a guard against a malformed binary, if the object's ELF e_flags
erroneously select xnack "on" for a target that does not support xnack,
still print the directive so the invalid state remains visible in the
disassembly rather than being silently dropped.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+55-0llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-xnack-unsupported-eflags.yaml
+10-4llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
+0-4llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx11.s
+3-0llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h
+0-2llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx12.s
+68-105 files

FreeNAS/freenas 600b36asrc/middlewared/middlewared/api/v26_0_0 service.py

NAS-141994 / 26.0.0-RC.1 / Export ServiceOptions from the v26_0_0 API module (#19437)

## Problem
`plugins/smb_/sid.py` imports `ServiceOptions` from
`middlewared.api.current`, but `api/v26_0_0/service.py` defines the
class without listing it in `__all__`. Since `v26_0_0/__init__.py` pulls
the module in with `from .service import *`, the name never gets rebound
and the import raises `ImportError` at plugin load. `load_modules`
doesn't guard `importlib.import_module`, so this is fatal — middlewared
won't start. It only shows up on 26 because master's `api/current.py`
points at `v27_0_0`, whose `__all__` does export the name.

## Solution
Added `ServiceOptions` to `v26_0_0/service.py`'s `__all__`, matching
v27. An AST sweep of every name imported from `middlewared.api.current`
across the tree confirms this was the only one missing from v26's
exports, so nothing else is queued behind it. `ServiceUpdate` is also
unexported relative to v27, but nothing imports it through
`api.current`, so I left it alone.
DeltaFile
+2-1src/middlewared/middlewared/api/v26_0_0/service.py
+2-11 files