NAS-144445 / 28.0.0-BETA.1 / Properly wait for oneshot alerts in tests (#20002)
`alert.oneshot_create` does not create the alert instantaneously because
it waits for alerts lock. Some of our tests do not expect that,
resulting in flakiness. The worst case is `test_root_password_disabled`
which also failed cleanup and left the system misconfigured.
(cherry picked from commit e28fd9b40d9ddc5f102bd27939905d570d24af8b)
NAS-144445 / 28.0.0-BETA.1 / Properly wait for oneshot alerts in tests (#20002)
`alert.oneshot_create` does not create the alert instantaneously because
it waits for alerts lock. Some of our tests do not expect that,
resulting in flakiness. The worst case is `test_root_password_disabled`
which also failed cleanup and left the system misconfigured.
ARM: Generate processor family and architecture lists in backend
ARMTargetParserDef.inc is only included by ARMSubtarget. It was
generated by the TargetParser library's tablegen step, which every
other LLVM library depends on, even when the ARM target is not
built. Generate it with the rest of the ARM backend's tablegen outputs
instead.
This removes 14% of the time in the TargetParser tablegen step, along
with a dependency on 71 ARM td files.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
NAS-144446 / 28.0.0-BETA.1 / Reset systemd unit error count before an explicit action attempt (#20004)
When systemd unit start/restart is explicitly requested by user,
unsuccessful start attempts limit should not be accounted for.
This also allows us to clean up our tests.
[PowerPC][AArch64] NFC - Remove unused extra second operand from extend nodes (#231340)
ISD::ZERO_EXTEND and ISD::SIGN_EXTEND take a single operand. PPC's
`generateEquivalentSub` and AArch64's `LowerADDRSPACECAST` passed an
extra constant operand, which was ignored by isel but makes the nodes
malformed and trips matchers such as SDPatternMatch's m_ZExt.
Assisted by AI
[mlir][arith] Don't fold to negative values of unsigned float types (#230974)
Some float types, such as f8E8M0FNU, have no sign bit
(`APFloat::semanticsHasSignedRepr` is false). Three folders could
produce a
negative value of such a type and crashed:
* `arith.subf` with `lhs < rhs` called `APFloat::subtract`, which hits
`llvm_unreachable("This floating point format does not support signed
values")`.
* `arith.negf` and `arith.sitofp` of a negative integer created a
negative
f8E8M0FNU attribute. Printing that attribute hit the same
`llvm_unreachable` in `APFloat::convertFromString`.
Reproducer (`mlir-opt -canonicalize`):
%a = arith.constant 2.0 : f8E8M0FNU
%0 = arith.negf %a : f8E8M0FNU
[13 lines not shown]
[clang][ssaf] Add a transformation pass to clang-ssaf-orchestrator-make (#231601)
Source edits are generated from the whole-program analysis result, which
exists only once every translation unit has been summarized and the
summaries linked. With --transformation, which requires --analysis, the
tool therefore builds the project a second time after the analysis.
In this pass the clang shim generates source edits and a report for each
compilation, and the ld shim merges the edits of everything a link
consumed with clang-ssaf-src-edit-merge. The run reports the link unit's
merged edits, and any edits a merge dropped because they conflicted.
Edit generation needs the link unit's name, which the linker writes into
the link unit summary during the analysis pass. The tool reads it from
there and passes it on in the second pass's configuration.
Attributor: Require willreturn to skip capture checks for readonly functions
AANoCapture assumed that a function which only reads memory, does not
unwind, and does not return a value cannot capture its arguments,
without looking at the uses. However, such a function can still capture
the address by whether it returns, e.g. by recursing forever if a pointer
is null. FunctionAttrs also requires willreturn for this.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
net/ngrep: Fix Capsicum support
- Fix Capsicum sandbox crash when using -I (offline capture):
pcap_fileno() returns -1 for handles opened with pcap_open_offline().
cap_rights_limit(-1, ...) fails with EBADF rather than ENOSYS,
bypassing the guard and causing ngrep to exit with "unable to limit pcap
pcap descriptor" whenever -I is used.
Cache pcap_fileno(pd) and skip cap_rights_limit() and cap_ioctls_limit()
when the fd is -1. Offline handles do not need Capsicum fd sandboxing
at this point since the file is already open; live captures on a BPF
device are unaffected.
- Fix USE_CAPSICUM always defined:
patch-configure.ac never initialises USE_CAPSICUM to "0", so
AC_DEFINE_UNQUOTED emits "#define USE_CAPSICUM" (empty) regardless of
the port option. patch-ngrep.c then uses #ifdef which tests for mere
presence of the macro rather than its value, so the Capsicum code
compiles in unconditionally. The "CONFIG: capsicum disabled" build
message is misleading -- the code was always active.
[18 lines not shown]
[SystemZ][Clang]Use the function name from the source for name PPA1 (#209215)
For z/OS, the behaviour for asm labels and #pragma map (PR coming
shortly) is to use the function name in the source code in the PPA1.
The zos-ppa1-name attribute behaviour for each function will be:
- if -mno-zos-ppa1-name is present use an empty string
- else if function has asm label use the mangled name if asm label
wasn't present
- otherwise don't generate the attribute
Also see https://github.com/llvm/llvm-project/pull/208870 for the llvm
side
net/ngrep: Fix Capsicum support
- Fix Capsicum sandbox crash when using -I (offline capture):
pcap_fileno() returns -1 for handles opened with pcap_open_offline().
cap_rights_limit(-1, ...) fails with EBADF rather than ENOSYS,
bypassing the guard and causing ngrep to exit with "unable to limit pcap
pcap descriptor" whenever -I is used.
Cache pcap_fileno(pd) and skip cap_rights_limit() and cap_ioctls_limit()
when the fd is -1. Offline handles do not need Capsicum fd sandboxing
at this point since the file is already open; live captures on a BPF
device are unaffected.
- Fix USE_CAPSICUM always defined:
patch-configure.ac never initialises USE_CAPSICUM to "0", so
AC_DEFINE_UNQUOTED emits "#define USE_CAPSICUM" (empty) regardless of
the port option. patch-ngrep.c then uses #ifdef which tests for mere
presence of the macro rather than its value, so the Capsicum code
compiles in unconditionally. The "CONFIG: capsicum disabled" build
message is misleading -- the code was always active.
[16 lines not shown]
acpi_lid: add an in-kernel lid state eventhandler
Lid state changes are only published to userland, via devd and evdev.
Drivers that need to react to the lid in the kernel have no hook, so
they end up installing a second ACPI_DEVICE_NOTIFY handler on the same
lid object and reimplementing the _LID evaluation.
Add acpi_lid_event, invoked from acpi_lid_status_update() alongside the
existing devd notification, carrying the new state (1 open, 0 closed).
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D60704
Attributor: Clear tail markers after heap-to-stack
A tail call cannot access the allocas of its caller. AAHeapToStack
replaced heap allocations with allocas but kept the tail markers on the
calls using them, so alias analysis treated those calls as not accessing
the new allocas. This miscompiled tramp3d-v4 with the full Attributor.
Clear the tail markers in functions where allocations were moved to
the stack, as AAPrivatizablePtr already does for privatized arguments.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[MLIR][XeGPU] set_anchor_layout transform op supports packed arguments (#230135)
Generalizes `xegpu.set_anchor_layout` so that `sg_layout`, `sg_data`,
and `inst_data` can be packed parameter handles.
Currently the arguments can be a variadic list of either int or
transform dialect parameter values:
```mlir
%c8 = transform.param.constant 8 : i64 -> !transform.param<i64>
%c4 = transform.param.constant 4 : i64 -> !transform.param<i64>
transform.xegpu.set_anchor_layout %0 index = 0 sg_layout = [%c8, %c4] sg_data = [32, 32] :
!transform.any_op, !transform.param<i64>, !transform.param<i64>
```
This, however, requires that the arity of these parameters is known at
schedule creation time. This PR allows passing in packed arguments as
well:
[7 lines not shown]
mgb: increase timeout
Increase wait timeout as needed for slower systems.
It takes ~120ms on the Codasip Prime for the MGB_PHY_READY bit
to set after phy reset command issued.
Reviewed by: emaste
Sponsored by: EPSRC ("UKRI3001: CHERI Research Centre")
Differential Revision: https://reviews.freebsd.org/D60706
net/traverse: Add new port
Traverse is a command-line tool for probing STUN and TURN servers.
It reports STUN binding results and authenticated TURN relay
allocations in text, JSON, or XML, with combined batch reports.
Reviewed by: jrm
Differential Revision: https://reviews.freebsd.org/D60645
[HLSL] Add semantic signature packing flags and invoke packing (#226554)
Adds two flags to specify how to pack signature elements:
`-pack-prefix-stable` and `-pack-optimized` in the dxc driver mode.
Adds the corresponding `-fdx-semantic-signature-packing-mode=` flag to
the clang driver.
Using this it invokes the correct packing algorithm during generation of
the semantic signature metadata and reports any packing diags.
Resolves: https://github.com/llvm/llvm-project/issues/204892
Assisted by: ChatGPT 6.1 Sol