Convert truecommand plugin to typesafe pattern
This commit adds changes to convert the truecommand plugin to the typesafe pattern, splitting the old compound ConfigService into a lean GenericConfigService that delegates to a ConfigServicePart with Pydantic models, while the portal/wireguard/state logic moves into plain context-first functions and same-process calls use call2. In-process consumers of truecommand.config (truenas and security) switch from dict access to typed attribute access.
NAS-141431 / 27.0.0-BETA.1 / Restrict TOTP interval to supported values (by sonicaj) (#19180)
This commit adds changes to restrict the per-user two-factor TOTP
interval to 30 or 60 seconds, since the OATH users file consumed by
pam_oath only understands those time-steps and any other value silently
breaks 2FA for the user. A migration clears the secret and resets the
interval for existing rows holding an unsupported value so affected
users re-enroll, and the render-time coercion is dropped now that the
input is validated at the API.
Original PR: https://github.com/truenas/middleware/pull/19170
---------
Co-authored-by: Waqar Ahmed <waqarahmedjoyia at live.com>
[clang-tidy] Fix bugprone-misplaced-widening-cast false positive on bitfield assignments (#197554)
When CheckImplicitCasts=true, the checker used the declared type of a
bitfield insread of the actual bitfield width to determine if widening
occurs. This caused false positives when assigning to a bitfield whose
declared type is wider than the source, but whose bitfield width
actually matches the source type. This behavior is fixed.
This PR fixes https://github.com/llvm/llvm-project/issues/197261 issue.
Co-authored-by: Vladislav Aranov <vladislav.aranov at ericsson.com>
[RFC][IR] Extract AMDGPU-specific verification logic into `VerifierAMDGPU.cpp`
`Verifier.cpp` is large and already mixes generic IR verification with
target-specific checks. We also have a growing amount of AMDGPU verifier logic
downstream, which would all end up in the same file if we don't address this,
and that is not ideal.
This patch extracts AMDGPU-specific verification logic into a separate
`VerifierAMDGPU.cpp` file, with shared infrastructure (`VerifierSupport`) moved
into `VerifierInternal.h`.
This is purely a code organization change, not a target-dependent IR verifier.
All checks remain compiled and linked into `LLVMCore` regardless of the target
triple. The extracted functions are called unconditionally at well-defined
extension points in `Verifier.cpp`, and each function internally gates on
target-specific conditions (for example, triple checks or intrinsic IDs) as
needed. The file is strictly limited to AMDGPU-specific IR constructs (amdgcn
intrinsics, AMDGPU module flags, etc.), and does not contain generic IR rules
that vary by target.
[10 lines not shown]
[flang][OpenMP] Refactor semantic check of SINGLE construct (#204339)
Extract it into a separate function and simplify the code. Avoid making
the distinction between a clause appearing on the "begin" and the "end"
directives for the purposes of emitting diagnostic messages.
One change in behavior is that using the same list item multiple times
in COPYPRIVATE clause(s) is an error regardless of the placement of the
clauses. Previously in some cases it was treated as a warning.
Part of the motivation is the goal of eliminating explicit definitions
of end-directives for directives that are not delimited, e.g. "end
single", but not "end declare_variant".
[InstCombine] Try folding align assumes with unkown offset (#204962)
There are a few folds which don't depend on the offset of the alignment,
but are nevertheless guarded on whether the offset is known. Run these
folds unconditionally instead.
clang/Driver: Use struct type for BoundArch instead of StringRef (#204748)
Change BoundArch arguments in the clang driver from StringRef (or
sometimes const char*) to a dedicated struct type that contains both
the architecture string and a parsed OffloadArch enum field. In the
future it may be useful to contain other feature bits here.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
[CodeGen] Join live range segments after dead def move (#204648)
Moving a dead def upward can retag a following live-range segment to the
same value as the previous segment. That leaves adjacent same-value
segments, which live range verification rejects.
Add a shared LiveRange helper for merging adjacent same-value segments.
Use it in the existing value-number merge code and after retagging later
segments for a moved dead def. Add an AMDGPU scheduler regression test.
mu: update to 1.14.2
- silence some MIME part errors
- some emacs 28.1+ modernization
- list org links with M-x mu4e-org-agenda-links
- when replying to a message with some part selected, cite only that
part
- fix parsing of the Keywords: headers. If you use those, you're
recommend to re-index your message
clang/AMDGPU: Remove driver restriction on --gpu-max-threads-per-block
Previously this flag was only handled for HIP, and would produce an unused
argument warning. There is a custom warning produced by cc1 that the
argument isn't supported, but practically speaking that was unreachable
due to not forwarding the argument. Also add a test for the untested warning.
Also use a simpler method for forwarding the flag to cc1.
clang/AMDGPU: Fix double linking opencl libs with --libclc-lib
Noticed by inspection. If using an explicit --libclc-lib flag,
do not attempt to also link the rocm device libs which will contain
different implementations of the same opencl symbols.
Co-Authored-By: Claude <noreply at anthropic.com>
clang/AMDGPU: Merge toolchain subclasses
Simplify the toolchain implementations by collapsing
them into one. Previously we had a confusing split. The
AMDGPUToolChain base class implemented much of the base
support. It was subclassed by ROCMToolChain, which would
have been more accurately described as the offloading subclass.
That was further subclassed into HIP and OpenMP specific subclasses.
Deleting those two is the important part of this change. There was
code duplication, and features arbitrarily handled in one but not
the other. The offload kind is passed in almost everywhere if you
really need to know the original language. However, I consider
this an antifeature, and it is really poor QoI to have the HIP
and OpenMP toolchains behave differently in any way. The platform
should be consistent and the driver behaviors should not depend
on the language.
There is additional mess in the handling of spirv, which this
[9 lines not shown]
clang/Driver: Use struct type for BoundArch instead of StringRef
Change BoundArch arguments in the clang driver from StringRef (or
sometimes const char*) to a dedicated struct type that contains both
the architecture string and a parsed OffloadArch enum field. In the
future it may be useful to contain other feature bits here.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
create_priority_list: add bounds check for priority_len
Overflow should not be possible since we deduplicate the options
but an explicit check won't hurt. Also move the dedup check for
options 121 and 245 right before they are stored to match the other
checks. OK deraadt@ florian@
[flang][OpenMP] Move unique clauses to allowedOnceClauses in OMP.td (#204995)
Many unique clauses were listed in "allowedClauses", which turned off
the single-occurrence check in flang. Move these clauses to the right
category to enable this check.
One exception to this is the IF clause: the IF clause is unique for all
non-compound directives, but is repeatable on compound ones with the
restriction that at most one IF clause can apply to any of the
constituents. This restriction is currently not enforced correctly in
flang, and so the IF clause was left unchanged.
Although this change is applied to a file shared between flang and
clang, clang does not use these categories for its checks, and hence is
not affected by this patch.