[BOLT] Gadget scanner: add less strict version of tail call checker
During tail call, it may be worth making sure the link register is as
trusted as during a regular call, though it may require inserting
expensive checking code by the compiler.
On the other hand, with pac-ret hardening enabled, there should be no
reason not to protect tail-calling functions at least as well as those
exited via regular return instruction.
This commit splits tail call checker into two versions: the basic one
which is suitable to make sure regular `PAC*` + `AUT*` are emitted as
needed, and the strict one, that additionally ensures the authentication
(if any) succeeded.
sys/cdefs.h: Introduce __maybe_unused attribute
The __maybe_unused attribute should be used for variables which may or
may not be used, such as when their only use is in an assertion. This
attribute is functionally identical to __unused, suppressing compiler
warnings for particular variable if it remains unused.
Reviewed by: Minsoo Choo <minsoo at minsoo.io>, imp
Differential Revision: https://reviews.freebsd.org/D56517
[mlir][spirv] Allow CooperativeMatrixType in Bitcast (#196096)
This makes is consistent with the spec: "Allow the use of OpBitcast on
objects of cooperative matrix type whose Component Type are integer
types with the same Width."
Assisted-by: Codex
[clang-tidy] Overloaded Unresolved member function call can't be static (#191432)
readability-convert-member-functions-to-static incorrectly suggests
making overloaded member function, with lambda function call, as
static (false-positive)
Mark usage of "this" as true, when a call to "UnresolveMemberExpr"
is obvserved
Fixes https://github.com/llvm/llvm-project/issues/171626
[WebAssembly] Add call_ref (0x14), return_call_ref (0x15), and ref.cast (0xfb16) (#195942)
Add MC-layer support for the typed function references opcodes:
- Instruction definitions in WebAssemblyInstrCall.td and
WebAssemblyInstrRef.td. call_ref / return_call_ref / ref.cast came with
the function-references proposal which was folded into wasm-gc, so they
are gated on HasGC (and HasTailCall for return_call_ref).
- Asm-parser hook that accepts the (ty) -> (ty) signature syntax for
call_ref, return_call_ref, and ref.cast, mirroring call_indirect /
return_call_indirect.
- Stack-effect modeling in WebAssemblyAsmTypeCheck so non-trivial
signatures type-check correctly.
- Encoding and disassembly tests under test/MC/WebAssembly.
Codegen does not yet select these opcodes. My motivation is unblocking
LLDB, which uses LLVM's disassembler. We got a report that these
instructions show up as `<unknown>` in LLDB.
rdar://163141531
[AMDGPU] Rework VOPD constraints for gfx12+ with data deps (#191264)
Follow-up to #178772. Relax the constraint that blocks VOPD formation
when SecondMI writes to registers that FirstMI reads from, except if the
resulting VOPD would take multiple cycles to issue. That can happen if
the same source VGPR is used in the same position in the other Op
(AllowSameVGPR), or if one of the following opcodes is used for OpX:
- v_fma_f64
- v_add_f64
- v_mul_f64
- v_max_num_f64
- v_min_num_f64
De-duplicate the check for which instructions can be paired in the
scheduling and formation passes, and use the same check logic in both
passes (previously scheduling was looser).
---------
Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
Apply patch, requested by mrg in ticket #2008:
xsrc/external/mit/xorg-server/dist/miext/sync/misync.c
xsrc/external/mit/xorg-server/dist/xkb/xkb.c
Apply security fixes from upstream
[flang][OpenMP] Support lowering of metadirective (part 2)
Lower non-constant user={condition(expr)} selectors in metadirectives
to a fir.if/else chain.
Only statically applicable when-clauses participate in dynamic
selection. Dynamic conditions are evaluated at runtime in declaration
order, with the best static match, an explicit otherwise/default
clause, or implicit nothing as the final fallback.
This patch is part of the feature work for #188820.
Assisted with copilot and GPT-5.4
Fix dynamic metadirective candidate selection
- Use one scored candidate path for static and dynamic metadirective variants.
- Dynamic user conditions are statically filtered and scored using their
non-user traits, then guarded at runtime with fir.if.
- Keeps construct/device/implementation traits enforced for dynamic
candidates and lets higher-scored static candidates beat lower-scored dynamic
candidates.
- Add regressions for construct mismatch, score ordering, and
implicit-nothing tie-breaking.
rtadvd(8): Honor pltime/vltime in interface declarations
Currently rtadvd ignores interface pltime/vltime specifications
unless the (static) address range is also included in the config file.
This extends the validity of a pltime and/or vltime stanza in
the config file for an interface to delegated addresses from
an upstream provider.
Signed-off-by: tickerguy <karl at denninger.net>
PR: 288426
Reviewed by: pouria
Pull Request: https://github.com/freebsd/freebsd-src/pull/1863
Add middleware support for LIO ALUA HA
Wire up the middleware side of LIO ALUA high-availability: load
lio_ha.ko with per-node addresses on service start, manage ALUA
state across failover events, clean up STANDBY configfs on pool
export, and add pre-flight validation that targets have static
initiator ACLs before ALUA can be enabled.
For each target, create a portal-less phantom TPG carrying the peer
node's controller group so that a single RTPG response from any
connected port lists both ALUA groups. Write tpgt_N/rtpi explicitly
before enable so that relative target port IDs in RTPG match the
tag formula (portal.tag on Node A, portal.tag + 32000 on Node B)
rather than being auto-assigned sequentially by the kernel.
ALUA group states are driven by role and ha_state:
MASTER + synced local=OPTIMIZED remote=NONOPTIMIZED
MASTER + connected local=OPTIMIZED remote=TRANSITIONING
[4 lines not shown]
[SLP] Treat extracts from undef vectors as real, not free, extracts
tryToGatherSingleRegisterExtractElements classified an extractelement whose
vector operand was undef as a free undef extract via UndefVectorExtracts.
When the remaining extracts already filled the two-vector shuffle budget,
the resulting build vector contained a third distinct vector operand and
tripped the assertion "Expected only 1 or 2 vectors shuffle." in
processBuildVector.
Use isUndefVector with IsPoisonOnly=true so that only extracts from poison
vectors are still treated as free.
Fixes #196015.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/196150
[libc][stdlib] Add EnvironmentManager (#195260)
Introduced an EnvironmentManager singleton that centralises environment
variable state: the environ array, per-string ownership tracking, and
capacity management. The manager exposes a minimal public API (get,
begin/end iterators) and keeps all internal state private.
Refactored getenv to delegate to EnvironmentManager::get() rather than
directly iterating app.env_ptr.
The ownership tracking and capacity management are preparatory
infrastructure for setenv.
Assisted-by: Automated tooling, human reviewed.
[dsymutil] Fix linker's ODR uniquing for typedefs with different underlying types (#195749)
The classic DWARF linker's `DeclContext` uniquing for `typedef` only
considers the typedef's name, file, and line — not the type it refers
to. When two `typedef` share the same name and source location but point
to different underlying types (e.g. due to clang's `preferred_name`
attribute generating a second typedef), they get the same `DeclContext`.
ODR deduplication then merges them, which can produce incorrect type
references or self-referencing typedef cycles in the output DWARF.
The self-referencing cycles are latent until a consumer follows
`DW_AT_type` chains through typedefs.
In particular, `unwrapReferencedTypedefType()` (introduced in
[#168734](https://github.com/llvm/llvm-project/pull/168734)) caused an
infinite recursion and eventual stack overflow.
Fix this by including the `DW_AT_type` target's tag and name in the
`NameForUniquing`, such that `typedef` with different underlying types
get distinct `DeclContexts`. This mirrors the parallel linker fix in
[9 lines not shown]
[BOLT] Rework user-facing documentation of BOLT gadget scanner (#176446)
Update the documentation to reflect the changes made to the original
prototype.
Co-authored-by: Kristof Beyls <kristof.beyls at arm.com>
Co-authored-by: Harald van Dijk <hdijk at accesssoftek.com>
15.1/relnotes: Mention ENA/arm64 irq mapping fix
This is technically a general intrng bug fix, but I'm not aware of the
bug affecting anything other than ena(4) on arm64 so I'm listing this
under "Cloud Support".
Sponsored by: Amazon
15.1/relnotes: Clarify Extended Destination ID
We don't merely recognize bits in CPUID; we make use of it to allow
FreeBSD to run on larger VMs, including EC2 r8i.96xlarge.
Sponsored by: Amazon