[Verifier] Strip incorrect strictfp FIXME, test (NFC) (#215487)
Follow up on 0193519 (Partial-revert "[IR] Make semantics of strictfp
consistent v2", #213723) to clean up the incorrect FIXME and test it
left behind. There are still open questions around the semantics of
strictfp, but it is clear that the semantics proposed by the original
patch is incorrect.
e1000: Disable autonomous PCH power gating after reset
Panther Point changed the reset value of CTRL_EXT.DPG_EN to enable
autonomous power gating. Clear it after hardware reset on Panther Point
and Nova Point controllers to prevent unexpected Tx/Rx hangs, packet
loss, or corruption.
MFC after: 1 week
[RISCV][NFC] Add tests for zext(phi/select) (#215363)
Since RISC-V has zero-extending loads (lbu/lhu), we can pattern match
zext-of-load into a single instruction. Often load and the zext/sext are
separated by select and / or phi instructions. In the future we want to
"push back" the zext instructions so they are next to the loads. This PR
precommits tests for this optimization.
Assisted by AI.
[CodeGen] Correctly classify/mark dead defs when adjusting lane liveness
Despite what the documentation of `adjustLaneLiveness` suggests, the
method never sets dead flags on dead def operands, even when missing
dead flags can later lead to machine verifier errors.
This makes the method identify dead definitions from definitions that
are initially thought to be alive, and makes it add a dead flag on the
last definition of a virtual register, matching the behavior expected
by the machine verifier (ref. "Instruction ending live segment on dead
slot has no dead flag").
`adjustLaneLiveness` and `detectDeadDefs` now also use the same
mechanism to identify dead definitions. It relies on comparing the
defined lanes of a definition with those that stay alive after it.
[lldb][Windows] Fix races in the DebuggerThread exception handshake (#213075)
`DebuggerThread::m_active_exception` and `m_exception_pred` are accessed
both from the Windows debug-event loop and from the thread driving the
debugger. There is no sync mechanism between the two. That caused 2
failures.
1. Use after free: The `m_active_exception.reset()` in
`ContinueAsyncException()` can destroy the exception while the delegate
uses it.
2. `ContinueAsyncException()` can be called between the end of the
delegate and `SetValue(result)`. Causing
`WaitForValueNotEqualTo(BreakInDebugger) to spin forever`.
This patch guards `m_active_exception` with a mutex and returns a
`ExceptionRecordSP` from `GetActiveException()` so callers no longer
have to lock a weak_ptr.
To verify this, I ran the test suite and injected a 50ms delay into the
[3 lines not shown]
[CIR] Leave a bad record member mark to the type parser
parseMemberKind named `data` only so it could reject it, and separately
rejected a second mark on one member. Both bought a tailored message
where the type parser already fails, and neither spelling can be reached
from printed CIR, since a data member is unmarked and only one mark is
ever emitted.
Drop both. The function then has no failure path left, so it returns
void.
Assisted-by: Cursor / claude-opus-5
[lldb] Use `GetValueAsUnsigned` for pointers in an `lldb.value` (#215580)
When we had a pointer in an `lldb.value`, we used to use
`GetValueAsSigned`. If the sign bit is set, we'd get negative values
like in the failed lldb-arm-ubuntu test
(https://github.com/llvm/llvm-project/pull/214295#issuecomment-5254541467).
With this PR, we use `GetValueAsUnsigned` for pointers to get the
unsigned value. I'm not sure if we should use `AsUnsigned` or
`AsAddress` here. The difference is that `AsAddress` will clear the top
bits. In the test, I'm using `assertEqual(arr_start + 2,
arr[1].sbvalue.GetLoadAddress())`, but as far as I know,
`GetLoadAddress` will not clear any bits(?)
[libc] Annotate RPC members as global pointers (#215412)
Summary:
These are currently all routed through the generic interface. Doing this
should safe a handful of instructions and make the intent clearer.
Basically, makes it nicer on the optimizer and reduces the number of
wait counts while effectively being NFC because this address space is
where these always lived.
Main rationale, lets you link C++ into OpenCL without requiring flat
addressing.
Also trims off some SGPRs I think.
ice(4): Add support for E835 CNSA 2.0 adapters
Added support for E835 adapters with post-quantum cryptographic (PQC)
algorithms in firmware/software signage and in SPDM attestation.
Signed-off-by: Pawel Sobczyk <pawel.sobczyk at intel.com>
Reviewed by: Miłosz Linkiewicz <milosz.linkiewicz at intel.com>
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D57868
[clang][OpenMP] Split OMPOrderedDirective into two classes (#214730)
Now that OMPD_ordered has been replaced with two variants, split
the OMPOrderedDirective class into two classes, one for each
variant.
[clang][OpenMP] Use different ids for block and s/a ORDERED directive (#214728)
Use OMPD_ordered_blockassoc for the block-associated ORDERED directive,
and OMPD_ordered_standalone for the standalone variant.
This still uses a single AST class for both though. The directive
kind stored in can now take either of the two values.
---------
Co-authored-by: Alexey Bataev <a.bataev at outlook.com>
[flang][OpenMP] Use different ids for block and s/a ORDERED directive (#214727)
Use OMPD_ordered_blockassoc for the block-associated ORDERED directive,
and OMPD_ordered_standalone for the standalone variant.
[OpenMP] Create separate directives for two variants of ORDERED (#214726)
The ORDERED directive comes in two flavors, standalone and block-
associated. Create two different directive ids, one for each kind.
This will allow a more precise connection between the directive id
and its properties.
This does not remove OMPD_ordered, nor does it change clang or
flang beyond the minimum required to keep working as before.
Keep uncorrected memory error alerts on Minis
This commit fixes an issue where the uncorrected memory error alert stopped running on Minis even though they carry ECC memory and populate the same EDAC counters the source reads. TRUENAS_HARDWARE excludes MINI by construction, so a licensed Mini lost a proactive support warning it used to get, and any alert it was already sitting on was purged on upgrade without a cleared notification.
TRUENAS_OR_MINI_HARDWARE is the union of the two hardware names, composed from them rather than defined as "not GENERIC" so a hardware class added later has to be added here deliberately. MemorySizeMismatch stays on TRUENAS_HARDWARE because its own check returns early without an HA licence.
Type alert applicability against AlertSource and AlertClass
This commit adds changes to drop the Declaration protocols in favour of TYPE_CHECKING imports of AlertSource and AlertClass, which is what review asked for, and to tighten the surface while we are in there: rule_name is no longer re-exported now that declaration_rule_name is the only entry point production goes through, and the Rule docstring keeps just the part that constrains how you write one, which is to name it so the black-hole diagnostic has something to report.
Dropping the protocols makes alert.applicability depend on alert.base, and import-linter counts TYPE_CHECKING imports, so that broke the package layering contract: engine reached vocabulary and snapshot through alert.base importing the whole package. alert/base.py now takes Rule from the engine module directly, which is the only thing it ever wanted, and the contract holds without an ignore.
Run the local account expiration alert everywhere
This commit fixes an issue where the local account expiration alert stopped running on Minis even though they can still turn on password aging: max_password_age sits behind the STIG entitlement, whose vector grants on the key column of either hardware side, and that key is injected into every legacy licence. The source is also the admin lockout recovery, since it regenerates shadow a day before the last full admin password ages out, so excluding a system that can arm password aging leaves it with no way back in short of a reboot.
check() already returns early unless max_password_age is set, so that early return is the applicability test and the rule is dropped rather than widened. On a system that cannot set the option the daily cost is one config read.
Only report a missing license on HA capable systems
This commit fixes an issue where an unlicensed R-series or Z-series started getting told to contact support about a license it was never sold. Those chassis are appliances so they satisfy the hardware rule, but they cannot fail over, and on 26 the product_type disjunct meant a system with no license only reached this alert when it was HA capable. HA capability is a chassis probe the applicability axes deliberately do not carry, so the test sits in check_sync rather than in applies_to.
Document alert applicability and the frozen inventory
This commit adds changes to document the applicability axes and the frozen inventory in the alert plugin docs, since the only record of how to regenerate that file lived in the test module's own docstring and you only found it after CI had already failed. The populations are pulled in with automodule so a new one documents itself, and the page spells out what does and does not require a regeneration plus what each guard test means when it fails.
Remove the broken SATA DOM wear alert
This commit adds changes to delete the SATA DOM wear alert source and its two classes. The source calls disk.sata_dom_lifetime_left, which was removed in 25.10 and has no implementation anywhere, so it raises on every run on any M or Z series chassis and produces nothing but alert source failures.
Alerts already persisted on existing systems clear on the next start through the stale source check in initialize, which runs before the policies are built, so nothing is announced as cleared. No migration is needed, matching how every previous alert source removal was handled.
Say which systems the enclosure alerts newly reach
This commit adds changes to test the failover run gates and to correct what the enclosure change was described as affecting. post_failover_blackout and require_stable_peer move out of the run loop into source_run_gates_pass so both can be checked without a middleware object or a running service, and a frozen inventory test pins which sources carry them and what each one is gated on.
failover_related was gating enclosure_status on an HA licence, which is a licensing predicate in front of a hardware question. Enclosure faults are now reported on every iX appliance that lacks an ENTERPRISE_HA licence, both unlicensed appliances and single controller licensed ones (ENTERPRISE_SINGLE, FREENAS-CERTIFIED). The earlier note said only "unlicensed appliances", which undercounts the fleet by the whole licensed single controller half. EnclosureHealthy is INFO and is raised once per enclosure, expansion shelves included, so affected systems will see several new informational alerts.
The matrix legend claimed a source row meant the source is ran, which was never true: it models applies_to only, and never post_failover_blackout, require_stable_peer, the schedule or source locks. That is the only change to the golden file.
Express alert applicability rules as functions and cache them once
This commit adds changes to replace the applicability rule dataclasses with plain functions that take facts, and to route every applicability answer through a single Applicability object holding one reading of those facts and memoizing per declaration. Nothing in the tree ever introspected rule structure, so the isinstance dispatch and the AnyOf/AllOf combinators go away with it, and because the seven vocabulary names are unchanged no alert declaration moves and the golden matrix is byte for byte identical.
The five separate get_facts() reads in the alert plugin become one, invalidated on system.post_license_update so an upload takes effect on both nodes at once. A None license is never cached, since get_license() returns None both for "no license" and "the daemon did not answer" and we do not want a hiccup to stick until restart.
Keep the FIPS misconfiguration alert on licensed Minis and whiteboxes
This commit fixes an issue where the FIPS misconfiguration alert stopped running on licensed Minis and licensed whiteboxes even though those systems can still enable FIPS: the STIG vector is key-only on both hardware sides and STIG is injected into every legacy licence, so they are entitled while TRUENAS_HARDWARE excluded them by construction.
EXPECTED_TO_BE_LICENSED is a strict superset of both the old product_type gate and the hardware gate, so nothing loses coverage, unlicensed appliances keep the check that catches FIPS being active when it was never configured, and licensed whiteboxes that could never see this alert are now covered too.
Name alert applicability rules and detect black-holed alerts
This commit adds changes to give the alert applicability engine one name per population instead of thirty open-coded rule constructions, and to catch alerts that are created but can never be displayed.
The rules alert declarations gate on now live in a vocabulary module next to the engine, so TRUENAS_HARDWARE is defined once rather than built at eighteen sites in two competing conventions. LicenseRule collapses into EntitlementRule, which asks the entitlement policy about any feature rather than the two the old enum could spell, so STIG and everything after it is a one-line declaration. AllOf joins AnyOf in the algebra, listed_when becomes listed_only_when to say that it narrows, and AlertFacts is gone in favour of the identical EntitlementFacts that applies() was converting to anyway.
A source whose rule is satisfied where its class's rule is not creates alerts that are stored and never shown. Nothing checked for that, and since the failover declarations deliberately straddle the two axes it is no longer something a reviewer can spot by eye. A test now infers the source to class relation out of check() and asserts the implication across every population, with a runtime guard logging the cases static analysis cannot see. It found four pre-existing ones in memory_errors and sensors, which are fixed by narrowing the sources so nothing user visible moves.
One behaviour change worth a release note: failover_related was gating enclosure_status on an HA licence, which is a licensing predicate in front of a hardware question, so unlicensed appliances will now report enclosure faults they were previously silent about. The flag is renamed post_failover_blackout to name what it actually contributes.