[clang][deps] Always initialize module cache out params (#194082)
We did not initialize the out parameters in #192347, causing the
"sanitizer-x86_64-linux-fast" bot to complain with:
```
SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1525:63 in compileModuleImpl(clang::CompilerInstance&, clang::SourceLocation, clang::SourceLocation, clang::Module*, clang::ModuleFileName)
Exiting
==clang==3084515==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x586360f7a604 in compileModuleImpl(clang::CompilerInstance&, clang::SourceLocation, clang::SourceLocation, clang::Module*, clang::ModuleFileName) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1525:63
#1 <...>
```
This PR should fix that.
[llvm-profgen] Add support for ETM trace decoding (#191584)
This patch introduces ETMReader to llvm-profgen,
enabling the reconstruction of execution profiles from ETM formatted
trace data.
- Integrate OpenCSD (CoreSight Decoding Library) as an optional
dependency via the LLVM_ENABLE_OPENCSD flag.
- Implement ETMTraceDecoder in ProfileData to interface with OpenCSD.
- Implement ETMReader, which uses hardware configuration and ELF memory
mapping to decode instruction traces.
- Add the --etm command-line option to specify raw trace inputs.
- Add the --target-triple command-line option to override the target
architecture for the binary.
The implementation targets microcontroller-class (Cortex-M) devices
based on the binary's target triple.
RFC:
https://discourse.llvm.org/t/rfc-add-etm-trace-support-to-llvm-profgen/90525
[dsymutil] Report error when section offsets exceed DWARF32 limit (#193867)
When linking very large binaries, debug section offsets can exceed the 4
GB DWARF32 limit. Previously this caused an assertion in
MCStreamer::emitIntValue when trying to emit an overflowing
DW_FORM_sec_offset value.
Detect the overflow at the point where section offsets are patched in
DWARFStreamer (for .debug_ranges, .debug_rnglists, .debug_loc,
.debug_loclists) and in DWARFLinker (for .debug_line and .debug_addr).
rdar://107413300
[LFI][AArch64] Add rewrites for control flow (#192602)
Adds LFI rewrites for control flow instructions (indirect branches and
returns). Indirect branches must go through `x28`, which is always
guaranteed to hold a sandbox address. Modifications to `x30` must guard
`x30` afterwards, to uphold the invariant that `x30` always holds a
sandbox address. As a result, bare return instructions can be used
without any additional rewrites.
[clang][NFC] Linux/Windows Multilib Include Path Tests (#193869)
This adds checks to the tests to show how the include path is changed by
the multilib logic for Linux/Windows added in commit
78820cb91605693b7d768be4ebc8b66181d3e9c3.
Assisted By: Claude
ena: Budget rx descriptors, not packets
We had ENA_RX_BUDGET = 256 in order to allow up to 256 received
packets to be processed before we do other cleanups (handling tx
packets and, critically, refilling the rx buffer ring). Since the
ring holds 1024 buffers by default, this was fine for normal packets:
We refill the ring when it falls below 7/8 full, and even with a large
burst of incoming packets allowing it to fall by another 1/4 before we
consider refilling the ring still leaves it at 7/8 - 1/4 = 5/8 full.
With jumbos, the story is different: A 9k jumbo (as is used by default
within the EC2 network) consumes 3 descriptors, so a single rx cleanup
pass can consume 3/4 of the default-sized rx ring; if the rx buffer
ring wasn't completely full before a packet burst arrives, this puts
us perilously close to running out of rx buffers.
This precise failure mode has been observed on some EC2 instance types
within a Cluster Placement Group, resulting in the nominal 10 Gbps
single-flow throughput between instances dropping to ~100 Mbps as a
[19 lines not shown]
ena: Adjust ena_[rt]x_cleanup to return bool
The ena_[rt]x_cleanup functions are limited internally to a maximum
number of packets; this ensures that TX doesn't starve RX (or vice
versa) and also attempts to ensure that we get a chance to refill
the RX buffer ring before the device runs out of buffers and starts
dropping packets.
Historically these functions have returned the number of packets which
they processed which ena_cleanup compares to their respective budgets
to decide whether to reinvoke them. This is unnecessary complication;
since the precise number of packets processed is never used, adjust
the APIs of those functions to return a bool indicating if they want
to be reinvoked (aka if they hit their limits).
Since ena_tx_cleanup now only uses work_done if diagnostics are
enabled (ena_log_io macros to nothing otherwise) eliminate that
variable and pass its value (ENA_TX_BUDGET - budget) to ena_log_io
directly.
[7 lines not shown]
Merge tag 'trace-ring-buffer-v7.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull ring-buffer fix from Steven Rostedt:
- Fix accounting of persistent ring buffer rewind
On boot up, the head page is moved back to the earliest point of the
saved ring buffer. This is because the ring buffer being read by user
space on a crash may not save the part it read. Rewinding the head
page back to the earliest saved position helps keep those events from
being lost.
The number of events is also read during boot up and displayed in the
stats file in the tracefs directory. It's also used for other
accounting as well. On boot up, the "reader page" is accounted for
but a rewind may put it back into the buffer and then the reader page
may be accounted for again.
Save off the original reader page and skip accounting it when
[4 lines not shown]
Merge tag 'block-7.1-20260424' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull block fixes from Jens Axboe:
- Series for zloop, fixing a variety of issues
- t10-pi code cleanup
- Fix for a merge window regression with the bio memory allocation mask
- Fix for a merge window regression in ublk, caused by an issue with
the maple tree iteration code at teardown
- ublk self tests additions
- Zoned device pgmap fixes
- Various little cleanups and fixes
[22 lines not shown]
speaker(4): move static data to text
Make this data const (it doesn't change) which will also move it to
a text section.
Signed-off-by: Raphael Poss <knz at thaumogen.net>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1922
Merge tag 'io_uring-7.1-20260424' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull io_uring fixes from Jens Axboe:
- Fix for a NOMMU bug with io_uring, where NOMMU doesn't grab page refs
at mmap time. NOMMU also has entirely broken FOLL_PIN support, yet
here we are
- A few fixes covering minor issues introduced in this merge window
- data race annotation to shut up KCSAN for when io-wq limits are
applied
- A nospec addition for direct descriptor file updating. Rest of the
direct descriptor path already had this, but for some reason the
update did not. Now they are all the same
- Various minor defensive changes that claude identified and suggested
terrible fixes for, turned into actually useful cleanups:
[47 lines not shown]
[NewPM] Port for AArch64StackTaggingPreRA (#194021)
This patch migrates the AArch64StackTaggingPreRA pass to the New Pass
Manager.
Following the standard pattern for pass migrations:
- The core logic has been extracted into a standalone
AArch64StackTaggingPreRAImpl class.
- A new pass manager wrapper (AArch64StackTaggingPreRAPass) has been
created.
- The legacy pass manager wrapper has been renamed to
AArch64StackTaggingPreRALegacy and updated to call the shared
implementation.
- The pass is registered in AArch64PassRegistry.def to make it available
to the New PM.
[AMDGPU] Add `.amdgpu.info` section for per-function metadata
AMDGPU object linking requires the linker to propagate resource usage
(registers, stack, LDS) across translation units. To support this, the compiler
must emit per-function metadata and call graph edges in the relocatable object
so the linker can compute whole-program resource requirements.
This PR introduces a `.amdgpu.info` ELF section using a tagged, length-prefixed
binary format: each entry is encoded as:
```
[kind: u8] [len: u8] [payload: <len> bytes]
```
A function scope is opened by an `INFO_FUNC` entry (containing a symbol
reference), followed by per-function attributes (register counts, flags, private
segment size) and relational edges (direct calls, LDS uses, indirect call
signatures). String data such as function type signatures is stored in a
companion `.amdgpu.strtab` section.
[4 lines not shown]
Fix xhci detection on Raspberry Pi 400
If you use the FreeBSD pre-build Raspberry Pi image, it does not include
the specific .dtb file for the Raspberry Pi 400. On this hardware, it
will fall back to attempting to load the Raspberry Pi 4 .dtb file
instead.
The Pi 4 .dtb file reports the board compatible name as
"raspberrypi,4-model-b" The Pi 400 .dtb file reports the board
compatible name as "raspberrypi,400" However, it's even better to
use the generic name.
When using the official Pi 400 .dtb file from the Raspberry Pi Firmware
collection, the FreeBSD xhci driver currently fails to recognize this,
and thus fails to initialize the xhci device. This means no external
USB, or internal USB (which feeds the build-in keyboard)
The official Raspberry Pi FreeBSD image has been working on the Pi 400
"on accident" simply because it didn't include the Pi 400 .dtb file
[11 lines not shown]
[DataLayout] Add null pointer value infrastructure
Add support for specifying the null pointer bit representation per address space
in DataLayout via new pointer spec flags:
- 'z': null pointer is all-zeros
- 'o': null pointer is all-ones
When neither flag is present, the address space inherits the default set by the
new 'N<null-value>' top-level specifier ('Nz' or 'No'). If that is also absent,
the null pointer value is unknown and LLVM will not fold based on it.
No target DataLayout strings are updated in this change. This is pure
infrastructure for a future ConstantPointerNull semantic change to support
targets with non-zero null pointers (e.g. AMDGPU).
Use truenas-discovery service
This commit replaces avahi, wsdd, and netbios services with a
unified truenas-discovery service. This simplifies the middleware
implementation of these services. Tests are adjusted so that we
have more direct testing that middleware configuration changes
are reflected in the in-memory running configuration of the
truenas-discoveryd daemon. During testing / validation I
discovered that there were some escape avenues whereby the
configuration may not be properly reloaded after netbios name
or workgroup changes.
(cherry picked from commit 509ea9d1256d707185f1fb18d30410fef0ef2684)