[clang][modules] Add `-fmodules-ignore-search-path=<path>` (#217061)
This introduces the search-path counterpart to
`-fmodules-ignore-macro=<macro>`. The named header search `<path>` is
dropped from the context hash of every module and physically removed
from every module-build invocation, and kept only for the translation
unit itself.
The motivating case is a build system that hands every compile a
per-target header search directory (e.g. Xcode's `DerivedSources`) even
though no modules include anything from it. Under
`-fmodules-strict-context-hash` those directories feed every module's
context hash, so an SDK module like Foundation is rebuilt once per
target rather than just once. Ignoring the directories for modules lets
those builds share a single module cache while the TUs that really do
need them keep working.
This only works right when no module needs the path: a lookup that would
have resolved through an ignored path simply fails, exactly as ignoring
[6 lines not shown]
[clang][modules] Cache failures for explicit modules (#215968)
Explicit module files are a (binary) input to the compilation. Just like
any other input file they are expected to not change during compilation.
There's no reason to disable failure caching in the `FileManager` for
them.
[clang][modules] Cache failed stats of additional module maps (#215964)
The additional module maps stored in PCMs are just regular input files
that are not expected to change during compilation. There's no reason to
disable failure caching in the `FileManager` for them.
Merge tag 'execve-v7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull execve update from Kees Cook:
- x86/elf: Correct comment for STACK_RND_MASK() (Lorenzo Stoakes)
* tag 'execve-v7.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
x86/elf: Correct comment for STACK_RND_MASK()
[IR] Remove dead declarations (#217701)
handleChangedLocation: The corresponding function definition was
removed on January 16, 2024 in commit
d499df02a2508641d67918d7dc41b2e01a4a4114.
noRenameOnPromotion: Added on February 28, 2026 in commit
3e05ab6322cbf2a96362dcacb5907ba519fe552d without a corresponding
function definition.
[flang][OpenMP] Switch SOURCE/SINK to use modifier infrastructure (#217644)
They are instances of the dependence-type modifier in the spec. Putting
them into the modifier infrastructure in the compiler will remove the
need for them to be validated by hand in the future.
Make the feature matrix cells self-describing
This commit adds changes to explain what a Vector row means, since it was six bare int fields: a class docstring covering why field order is COLUMNS order, which half of a row a system reads and why Minis fall on the CE side, and the non-obvious part - that a license which omits a feature's key revokes the bare unlicensed grant rather than being a superset of it. Each cell also gets a one-line docstring naming the population it governs.
Every Vector literal is now built by keyword too, so a row names its columns instead of leaving the reader to count cells against COLUMNS, and the trailing comments that were standing in for those names are dropped. No cell value changes.
Remove LTS as a licensed feature
This commit adds changes to drop LTS from the entitlement engine, since the key never acquired a consumer: it carried a matrix row but no policy entry, so nothing ever resolved for it and system.feature_enabled answered it only by reading the raw license list and bypassing the policy entirely. The matching vocabulary removal lands in truenas_license, and the unit suite pins the two together so neither can move alone.
Remove JBOF as a licensed feature
This commit adds changes to drop JBOF from the entitlement engine entirely, since shelf ownership is a quantity that lives in the license enclosure counts and a boolean feature key cannot express it. jbof.licensed goes back to reading those counts directly, and the addhw injection bucket that existed only to synthesise the key goes with it.
The system serial check that used to sit alongside that count stays removed, which is deliberate: the enclosure counts are enough on their own.
Gate KMIP through the entitlement engine
This commit adds changes to gate KMIP key management through the entitlement engine. KMIP had no license check at all until now, so the key is injected into every legacy license to make sure no existing licensee loses key management on upgrade.
Only the enable transition is gated. Disabling KMIP is how escrowed ZFS and SED keys are pulled back to the local database, so a system that loses the entitlement must still be able to turn it off and recover its keys.
Record the detected HA platform on HardwareInfo
This commit adds changes to carry the HARDWARE half of detect_platform through classification onto HardwareInfo, with an is_ha_capable predicate reading MANUAL as "not one half of an HA pair", so that question can be answered off the same cached probe everything else already asks. The field is required rather than defaulted, because the only sensible default is MANUAL and every site that forgot to pass it would silently receive the not-HA-capable answer.
is_ha_capable is deliberately not hardware_class.is_appliance, which is true of every iX appliance including the single-controller ones. Nothing reads the new field yet, so no behaviour moves.
Ignore legacy licenses issued for freenas models
This commit adds changes to drop a legacy license whose model is freenas prefixed, so a FreeNAS Certified or FreeNAS Mini blob no longer normalizes into a LicenseInfo at all and the system reads as unlicensed. Those units bought none of the functionality the injection below hands out, there is no useful subset to inject for them instead, and the rejection is deliberately silent.
With freenas models rejected outright the enterprise only injection condition could only ever exclude a legacy blob carrying no model at all, so the two injection buckets collapse into one. That does hand a model less blob the SMB fastpath and Veeam flags it did not get before, which is accepted -- such a license cannot exist in the field without stable/26 already tripping over it in product_type.
Key product type off hardware rather than the license
This commit adds changes to make system.product_type a pure hardware question — enterprise now means iX hardware excluding Minis, with no license input at all, matching how the entitlement engine already classifies systems. The process-wide product type memo and its reset on license upload go away with it, and disable-rootfs-protection asks the hardware directly so the gate still works with middlewared stopped.
The sudo audit gate in sudoers.mako moved onto the etc render context because a module level get_entitlement call cannot be mocked from integration tests, and the five test files still importing the removed product_type helper are fixed. Those mocks were already inert — the gates they targeted key off fips_available now — so this drops dead fixtures rather than preserving anything.
Gate the zfs.tier tests on the ZFSTIER entitlement
This commit fixes an issue where three tests under tests/api2/zfs_tier still called system.is_enterprise after it was removed, so the module scoped pool fixture errored and took the rest of the directory with it. They now ask the engine for ZFSTIER, which is the question zfs.tier.update itself asks.
The old predicate was wrong in both directions anyway. ZFSTIER grants on the two key columns whichever hardware side you are on, so an appliance licensed without the key used to build a six disk pool and then fail, while a CE box whose licence carried the key skipped a test it should have been running.
Drive consumer entitlement tests through the live engine
This commit adds changes to replace the canned entitlement stubs in the consumer unit tests with a shared helper that points truenas.entitlements.check and .feature at the live policy over synthesized EntitlementFacts. Those tests used to hand the gate an answer and then assert it came back, so none of them could fail on a wrong POLICY row, a flipped vector cell or a missing legacy injection; the test now owns only the facts and the verdict is the engine's.
Also covers the seams around the engine that nothing touched before: the DMI to HardwareClass to check_entitlement join, including the first direct assertion of is_appliance, which is what picks the half of the matrix a machine reads; the legacy injection set, derived from production rather than hand-copied and pinned separately so the swap does not go tautological; the KMIP enable-transition carve-out that keeps a system which lost the entitlement able to disable KMIP and recover its escrowed keys; support ticket routing across all six columns, with the outbound request made structurally impossible; and a scan of tests/ that catches an integration mock naming a feature POLICY no longer carries, which today degrades to no mock at all with nothing logged.
Adapt dict of model fields when converting between API versions
This commit fixes an issue where a field declared as dict[str, Model] was never version adapted, so an older client silently got the raw payload back rather than a converted one. The new clause has to come after the single nested model check because both shapes are a plain dict at runtime, and reversing them feeds map values into the model adapter.
Flip SED onto its matrix vector
This commit adds changes to bind SED to its product-matrix vector instead of the transitional legacy shim, which was the last live LegacyRule. The shim required the feature key in every column while the matrix grants SED on iX hardware alone and on any licensed system, so this widens access rather than withdrawing it - no existing system loses SED, and no key injection is needed because all four license-present columns already grant.
Worth noting stable/26 gates SED on a v2 daemon license with no legacy fallback, so every legacy-licensed system in the field currently reads as unlicensed for SED even if it bought the bit. This restores those systems.
The LegacyRule kind, its dispatch branch and the legacy module all stay put for whatever needs a shim next; only the SED binding moves. The docstrings that promised to delete them once the last feature flipped have been corrected to match.
Gate Webshare through the entitlement engine
This commit adds changes to gate Webshare through the entitlement engine. Webshare had no license check at all until now, so the key is injected into every legacy license to make sure no existing licensee loses their shares on upgrade.
Enforcement is set-time only, on share creation and on the service config. An update that leaves a share disabled is let through without the entitlement, so a system that has lost it can still turn a share off rather than having to delete it. Existing shares keep serving, since nothing re-reads the entitlement after the fact.
Note the WebUI currently hides Webshare from Enterprise systems and shows it to Community Edition, which is the inverse of this gate. That needs a matching change on the UI side before the two agree.
Fold platform detection into the hardware package
This commit adds changes to move detect_platform into middlewared.utils.hardware and have the classifier consult it first, so the QEMU and bhyve rules live in one place rather than two copies that can drift apart. The function is moved verbatim; MANUAL is not treated as an answer and falls through to the chassis tag, so R-series, Z-series, Minis and whiteboxes classify exactly as they did before.
One population changes: a QEMU virtual machine stamped as an HA node now classifies as IXKVM even when its chassis tag names a Mini, so it lands in the appliance column instead of the Mini one. detect_platform also picks up its first test coverage, having had none.
Key HA capability off the hardware probe
This commit adds changes to answer system.is_ha_capable and ha_panic's HA check from the cached hardware probe rather than from failover.hardware and a second open-coded MANUAL comparison, so one rule lives in one place. The value is unchanged: both paths read the HARDWARE half of the same cached detect_platform, and the 28 callers of system.is_ha_capable are untouched.
failover.hardware stays for the callers that want the platform codename rather than the boolean.
Gate the enterprise apps train through the entitlement engine
This commit adds changes to gate the enterprise application train on its matrix vector instead of product_type. The vector only grants on iX hardware holding the key, so licensed Minis, keyed whiteboxes and HA-capable systems with no license stop having the train pinned for them -- they can still select it by hand, since preferred_trains only filters what app.available browses.
Legacy injection stays enterprise-only on purpose: the vector's community-side key cell is zero, so injecting the key into every legacy license would move a holder from one denying cell to another. The TRUENAS-R check sitting next to the gate was dead as well, because failover.hardware can never return a value with that prefix.
Give HardwareClass an is_appliance predicate
This commit adds changes to move the appliance-vs-not test onto HardwareClass itself so the entitlement engine stops open-coding the TRUENAS_HW comparison, and to declare the hardware, entitlement and license package layerings as import-linter contracts.