iflib: Allow conditional LED device support
A driver class may implement LED control even though the capability is
not available on every device or firmware version it supports. Add an
optional capability method and consult it before creating the led(4)
device. Default to supported so existing providers are unchanged.
This will be used by bnxt which blends PF and VF in the same driver.
MFC after: 2 weeks
NAS-142109 / 26.0.0-RC.1 / Protect the container dataset from user deletion (#19489)
## Problem
`<pool>/.truenas_containers` was destroyable through the public API. The
destroy and rollback guards test the second path component against
`INTERNAL_PATHS`, and the container dataset was not in that tuple, so a
recursive `zfs.resource.destroy` wiped the whole tree, container rootfs
snapshots deleted cleanly, and the image snapshot went away with `defer`
set. `pool.dataset.delete` only failed by accident and reported a
misleading "does not exist".
Adding the entry is not enough on its own.
`pool.reset_mountpoint_recursively` reads the container dataset out of a
pool-level query, which filters internal paths out, so the custom
mountpoint would silently stop being repaired and containers would come
up on an empty directory.
## Solution
Move the mountpoint repair into the container plugin as
[20 lines not shown]
victorialogs*: Update to 1.52.0
Changes:
Important upgrade notes/breaking changes:
Update Note 1: LogsQL: disallow using filter pipes without the filter
prefix if the filter doesn't start with field_name: prefix. For
example, foo | bar is disallowed now. It must be rewritten to one of
the following equivalents: foo bar, foo | "bar", foo | _msg:bar or foo
| filter bar. This reduces the chances of incorrectly written queries
like in the 1454. However, this may be a breaking change if you have
queries that filter without the filter prefix, such as ... | !foo, ...
| {host="x"}, ... | >5 or ... | =foo - these now fail with unexpected
pipe and must add the filter prefix (e.g. ... | filter !foo).
Update Note 2: cluster version: this release bumps the internal
vlselect and vlstorage protocol version (see the
queries-longer-than-10MB fix in 1462). A version mismatch between
vlselect and vlstorage fails the request, so queries are expected to
fail during a rolling upgrade while the cluster runs mixed versions.
[5 lines not shown]
Protect the container dataset from user deletion
## Problem
`<pool>/.truenas_containers` was destroyable through the public API. The destroy and rollback guards test the second path component against `INTERNAL_PATHS`, and the container dataset was not in that tuple, so a recursive `zfs.resource.destroy` wiped the whole tree, container rootfs snapshots deleted cleanly, and the image snapshot went away with `defer` set. `pool.dataset.delete` only failed by accident and reported a misleading "does not exist".
Adding the entry is not enough on its own. `pool.reset_mountpoint_recursively` reads the container dataset out of a pool-level query, which filters internal paths out, so the custom mountpoint would silently stop being repaired and containers would come up on an empty directory.
## Solution
Move the mountpoint repair into the container plugin as `container.ensure_pool_mountpoint`, which names the dataset explicitly - naming an internal path opts out of the filter, the same thing `docker.fs_manage.ensure_ix_apps_mount_point` relies on for `ix-apps`. It also refuses to overmount, which matters more here than for `ix-apps` because the container dataset exists on every pool and two pools can end up claiming the same path after a rename.
- **`pool.reset_mountpoint_recursively`** delegates to it, after the inherit walk rather than inside the first-level loop.
- **`ensure_datasets`** repairs a drifted mountpoint instead of raising, so it is no longer a dead end.
- **`container.repair_pool_mountpoints`** runs on boot between the legacy migration and autostart, covering `pool.import_on_boot` and the failover import, neither of which resets mountpoints at all.
With that in place `.truenas_containers` joins `INTERNAL_PATHS`. It is spelled out there rather than imported so the zfs layer does not reach into a plugin package, and a unit test keeps the two in sync.
`pool.filesystem_choices` no longer lists container datasets, so any existing periodic snapshot or VMware task pointed at one will fail revalidation - worth a release note. Renaming remains unguarded: `zfs.resource.rename` has no internal-path check, and the same hole applies to `ix-apps` and `.system` today.
[flang][acc] Ensure location is set for acc routine bind target (#215867)
Currently when prototype is created for an `acc routine bind` target, it
receives unknown location. Update it so that it inherits the location
from the `acc routine` directive that led to this creation in first
place.
[libomp] Parse OMP_DEFAULT_DEVICE with new device trait parser
... but do not yet expose the new functionalities to the user. This is a
backward compatible update that is going to be followed by the step to
the OpenMP 6.0 semantics as defined in 4.3.8.
[TailCallElim] Only suppress tail call elim for cold calls in cold funcs (#215842)
Modifies the optional suppression of tail call elimination added in
PR209642 to only apply when the function entry is also cold. Otherwise
the tail call elimination on a cold path within a hot function may force
unnecessary stack frame setup and teardown for the calling convention
into the hot entry block.
igc: Recover from fatal internal memory errors
I225 and I226 report uncorrectable internal memory errors through
ICR.FER and identify the affected region in PEIND. Depending on the
region, hardware stops transmit or all PCIe and DMA traffic until the
port is reset and reinitialized.
Enable the fatal error interrupt and capture its read clear status in
the interrupt filter. Mask the cause while an iflib reset is pending,
report the affected memory regions, and expose per region indication
counters.
PCIe region parity failures require a different recovery order from a
normal reset: assert DEV_RST, wait at least 3 ms, disable PCIe master
requests, clear PCIEERRSTS, and then reinitialize the port. Follow that
sequence before entering the normal reset path and clear the remaining
LAN status afterward.
The I225/I226 PBECCSTS layout is unrelated to the PCH layout previously
[20 lines not shown]
igc: Report corrected internal ECC errors
I225 and I226 do not interrupt for corrected internal ECC errors.
Instead, the DMA packet buffer and PCIe memories expose sticky status
bits in PBECCSTS and PCIEECCSTS.
Sample these bits with the regular hardware statistics update, preserve
the PBECCSTS ECC enable state while clearing its RW1C indication, and
expose separate counters for the DMA packet buffer, PCIe transmit-data
memory, and PCIe retry buffer.
These counters represent observed indications rather than an exact error
count because multiple corrections between samples collapse into one
sticky status bit.
Hardware validation used an I225-IT (rev 3) and a debug kernel that
wrote only the documented self-clearing injection bits. Each test
armed the injector, exercised the owning RAM with traffic, and compared
the corresponding counter before and after.
[14 lines not shown]
[NVPTX] Cleanup Subtarget predicates (NFC) (#215846)
Remove redundant PTX checks when that version of PTX is already required
by the architecture.
Introduces some new helper classes in TableGen and move predicates out
of C++ where possible.
Check non-default iterator lower bounds
Bind the declare mapper iterator range and trace its induction variable
through the normalized locator bound. Verify that both the offset
calculation and map start index retain the array's -2 lower bound.
[compiler-rt][Darwin] Drop i386 slice for builtins on modern SDKs (#215388)
The SDK >= 10.15 i386-removal in darwin_test_archs was gated by `if(NOT
TEST_COMPILE_ONLY)`, so it never fired for the builtins config, which
sets TEST_COMPILE_ONLY=On. `-arch i386` still compiles fine on current
SDKs — ld is the only stage that rejects it — so the compile-only probe
kept i386 in DARWIN_osx_BUILTIN_ARCHS, and downstream `strip` on the
resulting fat archives fails on Xcode 27 with "ld: linking for i386 is
no longer supported".
Hoist the check above the guard so it applies to both the runtime and
builtin arch probes.
[libc] Remove APPEND_LIBC_TEST (#215869)
It is not needed now that we're never running hermetic and unit tests in
the same build, and it also avoids races with leftover unit test
binaries in the build folder.
[CVP] Infer no-wrap flags from operand ranges at use sites. (#207522)
When processBinOp cannot prove a no-wrap flag from the operand ranges at
the definition, fall back to querying the operand ranges constrained at
the binop's use sites. This recovers nsw/nuw when the guard that
establishes the range dominates the uses but not the definition (e.g.
the def sits in the loop body ahead of the overflow-guard branch that
all uses are behind).
This is triggers in a number of C/C++ workloads and is also quite common
in Swift code which emits overflowing ops extensively, and aborts if the
check fails.
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/621
Alive2 proof for `@same_guard_diff_ops` from the tests
https://alive2.llvm.org/ce/z/YvHQsK
[3 lines not shown]
du: Print progress information to stderr
* On SIGINFO, print the current path to stderr rather than stdout.
* Do so immediately, instead of the next time we finish a directory.
* Document this behavior in the manual page.
PR: 296861
MFC after: 1 week
Fixes: d1588599c024 ("Report the next directory being scanned ...")
Reviewed by: wollman
Differential Revision: https://reviews.freebsd.org/D58702
(cherry picked from commit fd79bf63442eefd2c3bfb695a377dbd705f5cc6d)
[LLVM] Move fp libcall selection into TableGen (#204029)
Summary:
Currently we maintain several different spaces that want to ask which
libcall an intrinsic / type value lowers to. This PR consolidates this
into tablegen by emitting floating point families. Change
getLibcallForIntrinsic to take FunctionType and derive the FP type
from the complete call signature, rather than requiring callers to pass
a preselected type.
This resolves some outstanding TODOs. The main motivation is a follow-up
where we use this information to augment the LTO pass to more
intentionally extract symbols. I.e. if we see `llvm.sin.f64` we should
extract `sin` from an LTO library.
du: Print progress information to stderr
* On SIGINFO, print the current path to stderr rather than stdout.
* Do so immediately, instead of the next time we finish a directory.
* Document this behavior in the manual page.
PR: 296861
MFC after: 1 week
Fixes: d1588599c024 ("Report the next directory being scanned ...")
Reviewed by: wollman
Differential Revision: https://reviews.freebsd.org/D58702
(cherry picked from commit fd79bf63442eefd2c3bfb695a377dbd705f5cc6d)
pseudofs: Don't purge the cache on shutdown
This is a waste of time and results in a use-after-free if linsysfs is
loaded and a USB network interface is in use, since USB devices are
disconnected at shutdown, which triggers a call into linsysfs, which
then tries to destroy a pseudofs node which has already been purged.
MFC after: 1 week
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D58359
(cherry picked from commit 4ebcdb8dd9a7bdddbc97ff6ee47e0a7556c76b5a)