Share the SED entitlement check between its callers
This commit makes some changes where the SED entitlement check was written out by hand in a few places instead of going through one helper. `validate_sed_license` moves out of the pool utilities, since nothing about it is pool specific, and takes the key to report under as a single string so a settings field validator can pass a bare field name while the pool paths keep passing a full schema path.
The global SED password is now checked by a field validator like everything else in advanced settings, rather than inline ahead of them, so a denial no longer pre-empts the other errors in the same payload. That needed the password merged into the dicts the settings helper diffs, because it is not a field on the entry, and it lets the helper go back to its original signature.
Enforce the SED entitlement on pool and password paths
This commit adds changes to actually enforce the SED rule, which until now was checked almost nowhere — creating a pool with the all_sed flag had no entitlement check at all. Pool create, update, attach and replace now go through a shared validate_sed_license, and setting a global or per-disk SED password is gated too, though clearing one always works so a system that lost the entitlement can still drop a secret it is no longer allowed to use.
Unlock is deliberately left ungated. A license daemon that errors with anything other than "no license" reads as unlicensed, so gating unlock would turn a daemon hiccup into a failed pool import at boot and a failed unlock on an HA master transition. The drives are already provisioned by that point, so unlocking them grants nothing new. What this enforces is no new SED usage, rather than no SED usage at all.
Report SED gate denials consistently and exclude sed in v26
This commit fixes a few problems found while reviewing the SED gates. `sed` is now excluded from the disk update model in v26 as well as v27, because stable/26 serves v26 as its current version and the two have to agree; a `from_previous` hook would not have helped, since the adapter validates a payload against the client's own model before it adapts anything.
The license denial in pool attach now raises before the disk lookup that can throw and discard it, and the global SED password denial accumulates into the same batch as the other advanced settings validators rather than pre-empting them, which needed an optional accumulator on the settings helper. The KMIP tests mock the SED entitlement because they set a global SED password to reach the escrow path.
Reject undetermined disks from all-SED pools
This commit fixes an issue where the disk SED capability column is tri-state but every consumer compared it with `is False`, so a disk that had never been probed passed the "must be SED" check and could join an all-SED pool unnoticed. The comparisons now reject anything that is not definitively SED. It also excludes `sed` from the disk update model, since it is a hardware fact we probe rather than something a caller has any business writing.
Require a SED feature key on TrueNAS hardware
This commit adds changes to narrow the SED entitlement so it only resolves on TrueNAS hardware carrying a license with the SED feature key, and to inject that key into legacy licenses so the existing installed base keeps working. Both halves have to land together: narrowing the vector on its own would deny every legacy licensee whose bitmask never carried the SED bit, and their pools would stop unlocking on upgrade. The injection is unconditional because the hardware conjunct lives in the vector, not in the license parser, which stays a pure function of the blob it is handed. This supersedes the earlier decision that allowed the keyless grants.
NAS-143780 / 26.0.0-RC.1 / Model HA as a license feature instead of a license type (by sonicaj) (#19762)
This commit adds changes to follow upstream collapsing enterprise_single
and enterprise_ha into a single enterprise type, with HA moving into the
features dict as its own key. The HA entitlement becomes an ordinary
matrix vector keyed on that feature, so LicenseTypeRule has nothing left
to decide and goes away with it.
Legacy blobs predate the feature vocabulary, so the shim injects the HA
key when the blob names a second controller serial. That is the same
condition which used to pick the enterprise_ha type, which is what keeps
every fielded legacy pair licensed for failover.
Original PR: https://github.com/truenas/middleware/pull/19732
Co-authored-by: sonicaj <waqarahmedjoyia at live.com>
[libc++abi][NFC] Return const void* from __dynamic_cast (#223737)
`__dynamic_cast` is only called magically by the compiler, so it really
doesn't matter what the exact protoype is as long as it's ABI
compatible. Making the return type a `const void*` simplifies the
implementation a bit though.
NAS-143780 / 26.0.0 / Model HA as a license feature instead of a license type (#19732)
This commit adds changes to follow upstream collapsing enterprise_single
and enterprise_ha into a single enterprise type, with HA moving into the
features dict as its own key. The HA entitlement becomes an ordinary
matrix vector keyed on that feature, so LicenseTypeRule has nothing left
to decide and goes away with it.
Legacy blobs predate the feature vocabulary, so the shim injects the HA
key when the blob names a second controller serial. That is the same
condition which used to pick the enterprise_ha type, which is what keeps
every fielded legacy pair licensed for failover.
(cherry picked from commit 0a5a6e5fbb94007206df82a2916f8b043d7675ac)
[clangd] Include the operator name in documentHighlight (#220518)
## Summary
- Placing the cursor on an overloaded operator's declaration (e.g.
`operator new`, `operator[]`) and requesting
`textDocument/documentHighlight` only highlighted the `operator` keyword
itself, not the name or symbol that follows it (`new`, `[]`, etc.), even
though that name is what's actually significant to the user.
- `ReferenceFinder` already splits some references into several spelled
tokens (used for Objective-C's split selector syntax); this reuses that
mechanism for the operator name too, extracting the tokens spelled in
the operator name's source range. This only applies to the declaration's
own occurrence.
## Test plan
- [x] `ninja check-clangd` passes
- [x] New cases added to `HighlightsTest.All` in
`clang-tools-extra/clangd/unittests/XRefsTests.cpp` covering `operator
new`, `operator delete` (clicking on either the keyword or the name),
and a multi-token operator (`operator()`)
[mlir][tosa] Add support for MXFP in SLICE (#220557)
Adds support to profile compliance for MXFP variants of SLICE
Change-Id: I184fbd49ef667d8d4e0ee09a2e65a72095d61daa
---------
Signed-off-by: Philip Wilkinson <philip.wilkinson at arm.com>
[InterleavedLoadCombine] Do not widen loads past a may-not-return instr (#223954)
The combined load reads the whole span at once and is inserted at the
first load, so it effectively hoists the later loads up to that point.
If an instruction between them may not transfer control to its successor
-- a call that might not return, or might throw -- then a load the
original program reached only conditionally would run unconditionally.
All combined loads are in one block, so bail unless the span from the
first to the last load is guaranteed to transfer execution to its
successor.
This gap predates the offset-index change; the old findPattern() did not
check for it either.
Assisted by AI tools.
[VPlan] Fix find last reductions not using frozen condition in select
A find last reduction is something like:
(select c[n], x[n], (select c[n-1], x[n-1], (select ...)))
So even if previous iterations had poison for c[x], the top-level select blocks it.
MaskSelect uses the non-frozen Cond, and that in turn is fed into VPInstruction::ExtractLastActive, which in turn gets expanded to vector.reduce.umax, which returns poison if any of the lanes were poison.
So in the case e.g. c[n] = 1, c[n-1] = poison and VF=2, the scalar loop returns x[n] whilst vector loop returns poison.
We're also introducing multiple uses of Cond, so for these reasons we need to use the frozen Cond.
Recognize test-declared alert classes from the collected tree
## Problem
The master `unit_tests` pipeline was failing on the alert applicability inventory (http://jenkins-eng-ci.cmb1.ixsystems.net:8080/job/master/job/unit_tests/355/). `_declared_by_the_unit_tests` matched a declaration's file against the `pytest` directory under the imported `middlewared` package only, and the pipeline imports the package from the installed copy while collecting the tests out of the checkout. With two different trees in play, every alert class declared by a test is classified as product code, so the rendered inventory picks up rows that the checked-in copy does not have and the comparison fails.
## Solution
Match against both the imported package's `pytest` directory and the one these tests were collected from, so a test declaration is recognized whichever tree it was read from. The pipeline is green again with this in place (http://jenkins-eng-ci.cmb1.ixsystems.net:8080/job/master/job/unit_tests/356/).
[AArch64] Remove unreachable DUPLANE lowering. NFC (#222418)
`LowerBUILD_VECTOR` handles non-constant `BUILD_VECTOR` splats by
emitting
`AArch64ISD::DUP`.
The following `DUPLANE` path checks `Value.getValueType()` against `VT`.
`Value` is a scalar `BUILD_VECTOR` operand while `VT` is the vector
result
type, so this condition cannot be false and the `DUPLANE` path is
unreachable.
Remove the dead path. `DUP`s of `EXTRACT_VECTOR_ELT` are already
converted
to `DUPLANE` by `performDUPCombine()` after legalization.
No codegen changes intended.
Fixes #222138
CodeGen: Add getInlineAsmMemoryOperandRegClass
Replace the use of getPointerRegClass to determine the register
class from an asm memory constraint, working to delete it. When
there are multiple pointer types there can't be just a single
answer.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
[AMDGPU] Skip volatile atomics in the atomic optimizer (#223927)
Folding a wavefront into one atomic changes the number of volatile
operations, which is not allowed
net/nats-server: Update to 2.14.7
Add a PORTSCOUT limit: upstream's -RC and -preview tags in the Go
module proxy list kept portscout from detecting new releases.
NAS-143789 / 26.0.0-RC.1 / Fix zfs.resource.create not-found messages and tier test gating (by Qubad786) (#19747)
## Problem
Two separate defects turned up running the `zfs.resource.create`
integration tests. `ZFSPathNotFoundException` stores an
already-formatted message in `args[0]`, and the create handler pulled
that out and repr'd it a second time, so a missing pool surfaced as
`Pool "'sometank' not found" does not exist.` rather than naming the
pool cleanly; the parent-dataset variant read the same way. Separately,
the `tier_pool` fixture gated on `system.is_enterprise`, which does not
exist, so the three tiering tests errored with `Method does not exist`
on every system instead of either running or skipping.
## Solution
- **Not-found messages**: the exception now keeps the raw path in
`self.path`, mirroring what `ZFSPathHasClonesException` already does,
and the create handler formats from that instead. Every raise site
already passes a bare path, and this was the only place in the plugin
treating `args[0]` as one.
[8 lines not shown]
NAS-143808 / 27.0.0-BETA.1 / Share a base class across the ZFS path exceptions (#19759)
Eight classes in the file repeated the same six lines to store a message
built from the quoted path and return it from str. They now subclass
ZFSPathException, which sets path and message from a class level reason.
Every one of them gains a path attribute, so the dataset create wrapper
reads e.path instead of e.args[0]. HasHolds now keeps its holds like
HasClones keeps its clones, and both join with a comma and a space.
Housekeeping in the same file. Classes are in alphabetical order after
the base. Sequence comes from collections.abc. NotProvided has a message
instead of none. RollbackBlocked passes the path and blockers to
Exception like RollbackConflict does.
NAS-143810 / 26.0.0 / Retry zvol destroy while udev still has the device open (by yocalebo) (#19763)
Everything is a wart on the side of systemd.... A zvol created moments
earlier is held open by udev for a few milliseconds. Destroying it in
that window fails with EBUSY. Retry the destroy for up to one second
when the target is a volume and the error is EBUSY. Volumes that are
really in use still fail.
This is causing flakiness in our CI tests. I looked at fixing this
different ways and, lo and behold, systemd inexplicably OPENS ALL
DEVICES BEFORE PROCESSING RULES and there is no way to change that
behavior even if you add a rule for udev to ignore a certain type of
devices. It would require us to fork systemd and add a small change.
It's not just a systemd issue either, upstream zfs suffers from the fact
that they can't "properly" integrate with the linux kernel in this
because of GPL symbol non-sense...sigh
Original PR: https://github.com/truenas/middleware/pull/19760
Co-authored-by: caleb <yocalebo at gmail.com>
NAS-143810 / 27.0.0-BETA.1 / Retry zvol destroy while udev still has the device open (#19760)
Everything is a wart on the side of systemd.... A zvol created moments
earlier is held open by udev for a few milliseconds. Destroying it in
that window fails with EBUSY. Retry the destroy for up to one second
when the target is a volume and the error is EBUSY. Volumes that are
really in use still fail.
This is causing flakiness in our CI tests. I looked at fixing this
different ways and, lo and behold, systemd inexplicably OPENS ALL
DEVICES BEFORE PROCESSING RULES and there is no way to change that
behavior even if you add a rule for udev to ignore a certain type of
devices. It would require us to fork systemd and add a small change.
It's not just a systemd issue either, upstream zfs suffers from the fact
that they can't "properly" integrate with the linux kernel in this
because of GPL symbol non-sense...sigh