[lld][llvm-objcopy] Enable Xbox subsystem for PE images. (#191779)
This patch enables selecting the Xbox subsystem (IMAGE_SUBSYSTEM_XBOX)
for PE images. Certain existing tools used in the Xbox homebrew scene
expect images to use the Xbox subsystem, so it's nice to be able to set
this within the LLVM toolchain instead of invoking yet another tool or
manually patching the binaries.
[flang] Recognize generic allocations in Flang LICM. (#191923)
Instead of matching particular operations like `fir.alloca`
we can use `MemoryEffectOpInterface` to figure out if a location
is a new allocation.
[analyzer] Fix alignment of entries in -analyzer-help (#190570)
Fix a formatting bug in `AnalyzerOptions::printFormattedEntry` (used by
`clang -cc1 -print-analyzer-options`), which led to misalignment of a
checker description.
This commit ensures that `printFormattedEntry` inserts a newline in the
corner case when the length of the name of a checker is exactly equal to
`EntryWidth`. (In this situation the old code inserted a space between
the name and the description, so this description was not aligned with
the other descriptions.)
Additionally this commit also fixes the corner case where the pad before
the checker name (specified by `InitialPad`) is 0. Before the fix, due
to `llvm::raw_formatted_ostream::PadToColumn` logic, `InitialPad = 0`
still added one space character as padding before the checker name.
Fortunately `InitialPad = 0` was never used in the program, so this bug
was not visible to the user.
These changes are both tested by the freshly added unit tests.
[RISCV][P-ext] Support plui.h/w in generateInstSeqImpl. (#192137)
There's some overlap in the pli/plui encodings. I've modified the code
to prefer pli.b over pli.h and to prefer pli.h over plui.h. This matches
what we do in the splat_vector path in RISCVISelDAGToDAG.
routing: Make ip[6]_tryforward() FIB-aware for local traffic
`ip_tryforward()` and `ip6_tryforward()` checks whether the destination
address is local or not without considering if it belongs to the current FIB.
If the destination is local but not in our FIB, forward it instead
of returning it to ip_input().
PR: 292319
Reviewed by: zlei
MFC after: 1 week
MFC to: stable/15
Differential Revision: https://reviews.freebsd.org/D56353
[sanitizer] Generalize FD closing in StartSubprocess (#192114)
Use internal_close_range with a fallback to the sysconf(_SC_OPEN_MAX)
loop. This removes the platform-specific #if and lets all platforms
benefit from close_range when supported.
Follow-up to #191971.
Make Passes Required - func-properties-stats and instcount (#192130)
These passes count different types of instructions and we want to see
them even though optnone is enabled
HBSD: Restore accidentally deleted file
I accidentally deleted the patch to the configure script for
multimedia/ffmpeg. This patch is maintained by our upstream, FreeBSD.
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
Added better datalayout incompatible error message (#191862)
The existing datalayout incompatible error assert does not help with
debugging, as it does not print the datalayouts in question.
This change makes this failure give more useful information.
Merge tag 'x86_tdx_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 TDX updates from Dave Hansen:
"The only real thing of note here is printing the TDX module version.
This is a little silly on its own, but the upcoming TDX module update
code needs the same TDX module call. This shrinks that set a wee bit.
There's also few minor macro cleanups and a tweak to the GetQuote ABI
to make it easier for userspace to detect zero-length (failed) quotes"
* tag 'x86_tdx_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
virt: tdx-guest: Return error for GetQuote failures
KVM/TDX: Rename KVM_SUPPORTED_TD_ATTRS to KVM_SUPPORTED_TDX_TD_ATTRS
x86/tdx: Rename TDX_ATTR_* to TDX_TD_ATTR_*
KVM/TDX: Remove redundant definitions of TDX_TD_ATTR_*
x86/tdx: Fix the typo in TDX_ATTR_MIGRTABLE
x86/virt/tdx: Print TDX module version during init
x86/virt/tdx: Retrieve TDX module version
[flang][OpenACC] Propagate acc.declare attribute to fir.global for USEd module variables (#192141)
When a module with `!$acc declare` is compiled separately from the
program that USEs it, `declareGlobal()` creates `fir.global` without the
`acc.declare` attribute. This causes implicit data mappings to override
device data that should already be present via `acc declare`.
The fix reads the symbol's `AccDeclare`/`AccCreate`/`AccCopyIn`/etc.
flags (already set from the `.mod` file by semantics) and attaches the
`acc.declare` attribute to the `fir.global`.
vmd(8): remove config parsing TOCTOU with disk parsing.
When vmd parses vm.conf, it's inspecting any provided disk images
to determine the disk format (raw or qcow) if left unspecified.
This is a big TOCTOU because nothing prevents these files from
changing between vmd startup and vm launch.
This change defers detection to vm launch time and tracks the disk
format as an enum instead of an int to make things more interpretable.
ok hshoexer@
[CIR] Fix heap-use-after-free in IndirectBrOp lowering (#191949)
The previous code called op->getBlock()->eraseArgument(0) to remove a
block argument when the poison attribute was set (unreachable block with
no predecessors). This directly mutated the IR, freeing the
BlockArgument while the MLIR dialect conversion framework still held
references to it. When the framework later replayed changes in
applyRewrites(), it dereferenced the freed BlockArgument, causing a
heap-use-after-free detected by ASAN.
Found by running check-clang-cir under ASAN
(test: clang/test/CIR/CodeGen/label-values.c).
The fix removes the eraseArgument call entirely. The MLIR conversion
framework tracks block arguments and handles their lifecycle. A block
with no predecessors naturally produces no PHI node in LLVM IR, so
manual removal was unnecessary.
Additional cleanup:
[4 lines not shown]
[AArch64] Cleanup of fptosi costs. NFC (#192144)
This contains some minor formatting changes, along with moving some code
closer
to where it belongs - keeping fixed length costs together, moving a
WideTy
block before the definition and use of ConversionTbl.
devel/got: update to 0.124
User-visible changes:
- fix a segfault in tog while using the & search feature
- expand tabs in log messages displayed by tog diff to prevent misalignment
Merge tag 'x86_mm_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm updates from Dave Hansen:
- Convert x86 code to use generic "pagetable" APIs and ptdescs
This aligns some the set_memory*() code better with the new page
table APIs, especially using ptdescs as opposed to 'struct page'
directly.
* tag 'x86_mm_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm/pat: Convert split_large_page() to use ptdescs
x86/mm/pat: Convert populate_pgd() to use page table apis
x86/mm/pat: Convert pmd code to use page table apis
x86/mm/pat: Convert pte code to use page table apis
HBSD: Fix build of multimedia/ffmpeg
ffmpeg was recently updated, causing issues with our patches for
_FORTIFY_SOURCE=2 support. Fix the build by rebasing the patches for the
updated version.
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
Merge tag 'x86_cpu_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cpu updates from Dave Hansen:
- Complete LASS enabling: deal with vsyscall and EFI
The existing Linear Address Space Separation (LASS) support punted
on support for common EFI and vsyscall configs. Complete the
implementation by supporting EFI and vsyscall=xonly.
- Clean up CPUID usage in newer Intel "avs" audio driver and update the
x86-cpuid-db file
* tag 'x86_cpu_for_7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tools/x86/kcpuid: Update bitfields to x86-cpuid-db v3.0
ASoC: Intel: avs: Include CPUID header at file scope
ASoC: Intel: avs: Check maximum valid CPUID leaf
x86/cpu: Remove LASS restriction on vsyscall emulation
x86/vsyscall: Disable LASS if vsyscall mode is set to EMULATE
[6 lines not shown]
Merge tag 'x86-vdso-2026-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 vdso updates from Ingo Molnar:
"vdso cleanups by Thomas Weißschuh:
- Clean up remnants of VDSO32_NOTE_MASK
- Drop pointless #ifdeffery in vvar_vclock_fault()"
* tag 'x86-vdso-2026-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/vdso: Drop pointless #ifdeffery in vvar_vclock_fault()
x86/vdso: Clean up remnants of VDSO32_NOTE_MASK
[GlobalISel] use constexpr LLT types when creating ISel data (#191574)
The GlobalISel uses a lookup table to map LLTs which is constructed
prior to initialization of extended LLT functionality, resulting in
ANY_SCALAR entries. During instruction selection, a hash-based
lookup is done on actual INTEGER/FLOAT LLTs. But hash values of
ANY_SCALAR do not match those of INTEGER/FLOAT, causing a failure.
Workaround is the use constexpr LLT, which encodes INTEGER/FLOAT LLT.
Assisted-by: Claude Opus 4.6
Merge tag 'x86-platform-2026-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 platform updates from Ingo Molnar:
- Remove M486/M486SX/ELAN support, first minimal step (Ingo Molnar)
- Print AGESA string from DMI additional information entry (Yazen
Ghannam, Mario Limonciello)
- Improve and fix the DMI code (Mario Limonciello):
- Correct an indexing error in <linux/dmi.h>
- Adjust dmi_decode() to use enums <linux/dmi.h>
- Add pr_fmt() for dmi_scan.c to fix & standardize the log prefixes
* tag 'x86-platform-2026-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/CPU/AMD: Print AGESA string from DMI additional information entry
firmware: dmi: Add pr_fmt() for dmi_scan.c
firmware: dmi: Adjust dmi_decode() to use enums
firmware: dmi: Correct an indexing error in dmi.h
x86/cpu: Remove M486/M486SX/ELAN support