[AMDGPU] Use SADDR with out-of-range offsets
Add the part of a constant offset that does not fit the immediate field
to the SGPR base with a scalar add, instead of falling back to a 64-bit
VGPR address. This matters most for async LDS DMA loads, which have no
immediate field for the global address.
[mlir][NFC] Name external model files and functions after their interface (#238261)
Throughout MLIR, a header declaring `register<Interface>ExternalModels`
is named `<Interface>Impl.h`, and a dedicated library is named
`MLIR<Dialect><Interface>Impl`. Rename files and registration functions
to follow this convention for consistency
[Offload][Omp] Migrate readGlobalFromImage through liboffload (#235935)
Add a new kind of Symbol to liboffload
(`OL_SYMBOL_KIND_IMAGE_VARIABLE`). The information of these symbols are
retrieved from the loaded image instead of through the device. This
allows to implement the support of `readGlobalFromImage` in
libomptarget.
As it doesn't seem to be used anywhere else, it can be removed from the
PluginInterface.
Assisted by Claude.
Tie webshare lifecycle to TrueNAS Connect state
## Problem
Webshare's Caddy only picks up TLS certificates when it starts, and middleware never stopped or restarted webshare when TrueNAS Connect changed. Unsetting TNC left webshare running on a deleted certificate, and re-registering or renewing left it serving a stale one ("connection not secure" until a manual restart). The same happened after every reboot: systemd starts the webshare units before `system.ready`, and caddy-config skips licence detection until then, so they came up with no certificates and nothing restarted them.
## Solution
- **One TNC hook:** TNC fires `tn_connect.certificate.changed` once its certificate is issued or renewed, and after it is deleted on a manual unset or a 401 deregistration. TNC knows nothing about webshare.
- **Webshare reconciles its own state:** on that hook and at `system.ready`, webshare restarts itself if it may run (RESTART rather than RELOAD so link-caddy picks up the certificate too), starts if enabled but stopped, or stops if it may not run and raises a dismissable `WebshareStopped` alert. Standby controllers are left alone.
- **Gate on Community hardware:** off iX appliances webshare needs TNC configured with a certificate. Enabling, starting or restarting it otherwise fails with a CallError, and pool import skips starting it rather than failing. The user's enable flag is kept, so webshare comes back by itself once TNC is configured again.
- **Services can veto boot enablement:** services get a `validate_enable` hook, and the rc render asks it before systemd-enabling a service's units, so a refused service is kept disabled in systemd and in /data/user-services.json (which the installer replays on upgrade) while its enable flag in the database is untouched.
Format test_ldap_client.py with ruff
Apply ruff format with src/middlewared/pyproject.toml, as the ruff CI
job does for new files. The change is formatting only.
[Offload][Omp] Remove last usage of tgt_async_info (#238328)
Move the stable KernelLaunchEnvironmentTy from __tgt_async_info to
AsyncInfoTy where it should be as is an OpenMP thing.
This removes the last usage of __tgt_async_info from libomptarget and we
can remove the liboffload helper.
Assisted by Claude.
[LoongArch] Lower vector sign extension with VSLLWIL and VEXTH
vsllwil.{h.b/w.h/d.w} with a zero shift amount sign-extends the low half
of the source elements, and vexth.{h.b/w.h/d.w} the high half. The old
lowering needed vslti + vilvl for the low half. Although vsllwil has a
higher latency and lower throughput than vilvl, it replaces two
single-cycle instructions with the same total latency and issue cost,
so it saves an instruction. For the custom SIGN_EXTEND legalization,
vsllwil + vexth also replaces vslti + vilvl + vilvh and shortens the
high-half path.
Chaining two vsllwil for a 4x SIGN_EXTEND_VECTOR_INREG would cost more
than the alternative, so interleave the source with itself twice with
vilvl, which replicates each element across its destination element,
and shift the top copy down with vsrai. When only the sign bits are
demanded, the vsrai is dropped.
When every element being extended is already all-ones or all-zeros,
e.g. a comparison result, interleaving the source with itself already
[4 lines not shown]
[LoongArch][NFC] Pre-commit tests for sign extension of sign-mask vectors
Add tests where every source element is all-ones or all-zeros before the
sign extension, plus a negative test where only some top bits are sign
bits.
Assisted-by: GLM 5.3
[analyzer] Fix FN for UCRT fopen ignoring the lack of `restrict` qualifier (#236747)
The MSVC C runtime (UCRT) declares `fopen` without the `restrict`
qualifiers of the standard prototype. From C99 on, the summaries of
`StdLibraryFunctionsChecker` require restrict on such parameters, so the
`fopen` summary is not applied: there is no argument constraint check
and no "Assuming that 'fopen' is successful" path note. The same holds
for any summary with restrict parameters when using UCRT implementation.
To address this limitation, ignore the `restrict` qualifier from the C
standard so that the UCRT signatures also fit the `Summary`.
This patch is assisted by Claude Opus 5.5
--
CPP-9448
Add entry to local declarations for split target / teams loop
Add missing entry to declaration map for split spelling target teamsloop
missing after #233539
[GlobalISel][AMDGPU] Support narrowing G_SMULH in narrowScalarMul (#237577)
For `G_SMULH`, this computes the unsigned high half the same way as for
`G_UMULH`, then corrects it for signed operands:
smulh(a, b) = umulh(a, b) - (a < 0 ? b : 0) - (b < 0 ? a : 0)
The `a < 0 ? b : 0` terms are built without branches: an arithmetic
shift right by (bit width - 1) gives all ones for a negative value and
zero otherwise, and that mask is ANDed with the other operand.
This doesn't change any existing output, since nothing created a wide
`G_SMULH` on AMDGPU before (the sdiv-by-constant combine rejects it). It
makes it possible to allow that combine for i64 next, which is the
second part of the issue. Tests are added for s64 and v2s64 in
legalize-smulh.mir.
Part of #236470
Time out LDAP requests when the server does not reply
LDAPClient did not limit the wait for an LDAP reply. search() called
result3() with no timeout, and the code did not set OPT_TIMEOUT. If the
server became unreachable while the connection was open, the health
check search waited until the kernel closed the TCP connection. With
the default tcp_retries2, this takes approximately 15 minutes. In the
reported test, the directory service status stayed HEALTHY for 24
minutes after the LDAP server became unreachable.
The code also set OPT_NETWORK_TIMEOUT with the global set_option()
after initialize(). initialize() copies the global options to the
handle, so the first handle did not get this timeout.
- Set OPT_NETWORK_TIMEOUT and OPT_TIMEOUT on the handle. OPT_TIMEOUT is
the default maximum time to wait for a reply. The bind and StartTLS
calls use only this default.
- Give the timeout to result3() in search(). The search_ext() timeout
is only a time limit for the server.
[4 lines not shown]
[offload] Remove redundant call to usesLLVMOffloadWrapper
usesLLVMOffloadWrapper was called twice when it could just be used to override
the Kind once for both bundleLinkedOutput and wrapDeviceImages. This also
allows that path to take the verbose image bundling.
[SPIR-V][NewPM] Collect debug values in SPIRVModuleAnalysis (#238032)
MachineModuleInfo::getMachineFunction returns null under the new pass
manager, so the debug info handler saw no DBG_VALUEs
security/acme-client: add JetKVM automation via acme.sh deploy hook (#5726)
Adds "Upload certificate to JetKVM (SSH)" (acme_jetkvm), a thin wrapper
around the acme.sh "jetkvm" deploy hook (acmesh-official/acme.sh#7254),
following the exact pattern already used by AcmeFritzbox/AcmePanos/
AcmeZyxelGs1900/etc.: set a few DEPLOY_JETKVM_* env vars from the
automation's config and let LeAutomation\Base::runAcme() invoke
`acme.sh --deploy --deploy-hook jetkvm`.
This is the "much smaller follow-up PR" requested by the maintainer on
opnsense/plugins#5621 in place of that PR's full custom PHP
implementation (own SSH exec session, own atomic-write logic, its own
API controller/configd actions) -- all of that now lives once in the
acme.sh hook instead of being duplicated here.
Exposes only what a user needs to fill in: host, username (default
root), port (default 22), and a "Reboot After Upload" checkbox (default
checked) that maps to the hook's DEPLOY_JETKVM_RESTART_CMD ("reboot" or
"none") -- narrower than the hook's own free-text restart command, kept
[62 lines not shown]