[flang][cuda] Propagate CUDA attrs from parent variable to component allocations (#206614)
When allocating a component of a CUDA-attributed derived type (e.g.,
`allocate(managed_var(1)%arr)`), Flang's lowering only checked the
component symbol (`arr`) for CUDA attributes — not the parent variable
(`managed_var`). Since `arr` has no CUDA attribute, the allocation used
`fir.allocmem` (host `malloc`) instead of `cuf.allocate`. Additionally,
the component descriptor's `allocator_idx` remained 0 (host default), so
`Descriptor::Allocate()` also dispatched to `std::malloc`.
## Changes
- **Attribute propagation**: For `StructureComponent` allocations,
propagate CUDA attributes from the base variable to the component in
both `genSimpleAllocation` and `genSourceMoldAllocation`.
- **Allocator index**: In `genAllocateObjectInit`, re-establish the
component descriptor with the correct `allocator_idx` via
`disassociateMutableBox` before allocation.
[2 lines not shown]
Convert sysctl plugin to typesafe port pattern
## Context
`SysctlService` was a `private = True` dict-based service with no over-the-wire surface, only consumed by other plugins. The typesafe convention for fully-private services is the port pattern: a lean `Service` shim delegating to plain, fully type-annotated module functions, keeping the existing return shapes (no Pydantic models).
## Solution
- Split the plugin into a lean `sysctl/__init__.py` shim (`SysctlService`, every method typed) delegating to plain functions moved into `sysctl/sysctl_info.py`.
- Registered the service in `main.py`'s `ServiceContainer` so `self.s.sysctl` is typed for consumers.
- Converted every same-process string `call('sysctl.…')` in `vm`, `system`, and the docker `SimpleService` to typed `call2`/`call2(services.…)`. Return shapes are unchanged, so there are no dict-vs-model breaks.
- Added the plugin path to `mypy.yml`.
NAS-141469 / 27.0.0-BETA.1 / Fix AD keytab freshness check and recovery churn (#19184)
last_password_change read the secrets.tdb timestamp with a stray ']' in
the key, so it always returned None and check_updated_keytab re-ran the
secrets backup + keytab store hourly. Drop the bracket.
Also cut directory-services recovery churn when AD is FAULTED: fast-fail
the winbind start in idmap.__wbclient_ctx rather than restarting per SID
lookup, cap the directoryservices_change job queue, and fix
get_db_secrets UnboundLocalError on invalid JSON.
Expand CI tests to cover regression.
(cherry picked from commit 69fa65bc1b0e5aa48d52509ff0b7c8098b4d4ab8)
LLVM now emits calls to strlen(3) and wcslen(3). Redirect those calls to
our hidden aliases to prevent unnecessary PLT entries (like we already do
for memmove(3), memcpy(4) and memset(3)).
ok deraadt@
NAS-141610 / 26.0.0-RC.1 / Replace removed `attr` command in SMB AFP xattr tests with inline Python (by anodos325) (#19232)
The `attr` package is no longer present on truenas, so
test_151_set_xattr_via_ssh and test_155_ssh_read_afp_xattr failed with
"command not found: attr". Use an inline `python3 -c` script calling
os.setxattr/os.getxattr on the `user.` namespace, reproducing the exact
on-disk xattr names the old `attr` commands created.
Original PR: https://github.com/truenas/middleware/pull/19231
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
[docs][HIP] Document source-based device code coverage workflow (#200197)
Add a section to HIPSupport.rst describing how to produce source-based
code coverage reports for HIP device code on AMD GPUs: compile with
-fprofile-instr-generate -fcoverage-mapping, extract the device ELF from
the host binary's .hip_fatbin section, unbundle with
clang-offload-bundler using the hip-amdgcn-amd-amdhsa--<arch> target ID,
and run llvm-profdata / llvm-cov against the device object.
[mlir-c] Fix -Wmissing-field-initializers in rewrite.c test
The new matchAndRewrite1ToN field left three existing
MlirConversionPatternCallbacks initializers under-initialized, which
fails the CI build under -Werror=-Wmissing-field-initializers.
kern: syscall_thread_enter() cannot fail
Attempting to handle the error gracefully can easily result in missing
SIGSYS, so this was made to always succeed in
39024a89146 ("syscalls: fix missing SIGSYS for several ENOSYS errors")
and returns the nosys entry on failure.
Drop the pretense of returning an error and clean up a few dead error
paths.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D57848
NAS-141610 / 27.0.0-BETA.1 / Replace removed `attr` command in SMB AFP xattr tests with inline Python (#19231)
The `attr` package is no longer present on truenas, so
test_151_set_xattr_via_ssh and test_155_ssh_read_afp_xattr failed with
"command not found: attr". Use an inline `python3 -c` script calling
os.setxattr/os.getxattr on the `user.` namespace, reproducing the exact
on-disk xattr names the old `attr` commands created.
[LLVM][Autoupgrade] Delete invalid lifetime.start/lifetime.end intrinsic decls and calls (#206769)
AutoUpgrade used to create invalid and unused `lifetime.start.i64` and
`lifetime.end.i64` intrinsics. This was fixed with
https://github.com/llvm/llvm-project/pull/204601. However, existing
bitcode generated prior to this fix might still have these unused and
invalid declarations in them, which now fail IR verification. Adopt
Autoupgrade to clean them up.
Invalid declaration of these intrinsics will be deleted, and if there
exists calls to these invalid intrinsics (not expected to be generated
by AutoUpgrade prior to the bug fix, but handling this case just for
completeness) these calls will be deleted as well.
Also tested with `sap_fct_splitting.bc` reported in
https://github.com/llvm/llvm-project/pull/204478#issuecomment-4845475424
(though not committing that as a unit test).
graphics/hugin: permit use of libepoxy instead of glew
Some users report problems with hugin coming from graphics/glew not
being built with EGL support. Permit using libepoxy instead of
graphics/glew for OpenGL stuff and make it the default to work around
this issue. Building with graphics/glew remains available as an option.
PR: 296330, 296368
Reported by: grog
Tested by: grog
MFH: 2026Q2
(cherry picked from commit 2fa6358ccc39f9ef705ca209fc9dacf276ef69df)
ZTS: snapdir: ensure mounts only occur when accessing beyond the snapdir
On Linux, automount only occurs for paths that are "beyond" the snapdir.
Accessing the snapdir itself eg with `stat()` does not itself trigger
the automount. Confirm that this is the case.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705
ZTS: snapdir: ensure the SNAPSHOT_NO_SUID tunable performs correctly
When set, zfs_snapshot_no_setuid will add the nosuid option to new
snapdir mounts, preventing setuid executables from being run as a
different user.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Ameer Hamza <ahamza at ixsystems.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18705