[RISC-V][MC] Convert remaining diagnostic tests to llvm-mc --verify (#238223)
Convert the remaining RISC-V MC diagnostic tests (41 files: 2 newly
convertible tests, Relocations/leb128.s and rvv/xsfvfofp4min.s, plus 39
tests that need manual changes on top of
`convert_mc_test_to_verify.py --inline`):
- Add 273 directives for diagnostics that the FileCheck lines did not
check, mostly "invalid instruction" (154) and "instruction requires
the following: ..." from RUN lines without the extension (e.g. the
xqci*, xmips, xsmtvdot*, rvzacas, and zicfiss tests).
- Move directives that the script attached to the wrong instruction
because their CHECK lines had no line numbers (mostly the *c-valid.s
and *zacas-valid.s tests).
- Fix 8 directives in rv32c-fuzzed-invalid.s whose CHECK lines only
matched the echoed source line rather than the real diagnostic.
Assisted-by: AI tooling
Pi image: boot the medium straight into kernel8.img, so it boots from USB (#757)
Since #694 the Pi image's config.txt started u-boot.bin. U-Boot can't
drive USB on a Pi 5 (it sits behind RP1), so the image stopped booting
from a USB stick. The firmware also refused USB boot on the Pi 500+'s 3 A
supply ("USB boot requires high current (5 volt 5 amp) power supply").
- config.txt starts kernel8.img, the firmware's own direct boot, as before
#694. The EEPROM firmware reads SD, NVMe and USB itself, so the medium
boots from all three.
- usb_max_current_enable=1, so USB boot works on a supply under 5 A. The
cost (USB ports may draw 1.6 A instead of 600 mA) is in the comment.
- u-boot.bin and EFI/BOOT still ship: the installer sets an installed
disk up to boot through them (nextbsd-userland), so installed systems
keep pkg kernel updates and boot environments.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[Attributor] Merge the scopes of potential values with a `|=` (#246909)
`recurseForValue` merges the scopes of a value with `+=`. If a value
appears more than once in the values of one scope, the sum is not a
valid scope.
This PR was assisted by AI but I reviewed all the changes.
i386/sdt: Use a single NOP for disabled probes
As on amd64, a disabled tracepoint must be a single instruction, so
that a thread cannot be interrupted inside it and resume in the middle
of the jump written when the probe is enabled. On i386, both
_SDT_ASM_PATCH_INSTR and sdt_tracepoint_restore() used five one-byte
NOPs.
Use "leal %ds:0(%esi,%eiz,1), %esi" (3e 8d 74 26 00) instead. The
multi-byte NOP (0f 1f) is avoided because i386 GENERIC still supports
CPUs without it.
Tested on stable/15 i386 under bhyve with a reproducer that toggles a
probe while other CPUs run its sites.
Reviewed by: markj
MFC after: 1w
Co-authored-by: Claude Opus 5.5
Differential Revision: https://reviews.freebsd.org/D62198
[Object][COFF] Bounds-check the PE signature offset in COFFObjectFile (#246158)
`lldb-target-fuzzer` finds a crash, which can be reproduced this way:
```
$ python3 -c "import sys; sys.stdout.buffer.write(b'MZ' + bytes(58) + (0x2020).to_bytes(4, 'little'))" > /tmp/pe-lfanew.bin
$ lldb -b -o "target create /tmp/pe-lfanew.bin"
(lldb) target create /tmp/pe-lfanew.bin
==49182==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x616000dd09e0
READ of size 4 at 0x616000dd09e0 thread T0
#1 0x000106262640 in memcmp
#2 0x0070160a7f2c in llvm::object::COFFObjectFile::initialize()
#3 0x0070160a783c in llvm::object::COFFObjectFile::create(llvm::MemoryBufferRef)
#4 0x007001d63270 in ObjectFilePECOFF::GetModuleSpecifications(...)
0x616000dd09e0 is located 7708 bytes after 580-byte region [0x616000dce980,0x616000dcebc4)
```
This commit is to add `checkSize` before the `memcmp`, the helper
`initialize()`
already uses for its other size checks.
Assited-by: Claude
rtwn: added support for Realtek RTL8192FU chipset
Added support for Realtek RTL8192FU chipset using rtwn driver.
* Used Linux's rtl8xxxu driver for reference.
* New registers derived from it are saved in r92f_reg.h.
* Current additions include:
IQ/LC calibration, channel configuration, LED configuration.
* Firmware image added as uuencoded rtwn-rtl8192fufw.fw.uu with a new
rtwnfw/rtwnrtl8192fu module.
Sponsored by: Alchemilla Ventures Private Limited
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D61728
hid: Increase HID_ITEM_MAXUSAGE to 32
I have a Logitech mouse that reports 16 buttons. Bump to 32 to be a
little more future proof. This increases the size of struct hid_item
but this struct is not exported to userland.
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D59273
(cherry picked from commit 5cc15fef2656b078982d453b8915379b47ff0e88)
Merge tag 'docs-secbugs-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/docs/linux
Pull documentation update from Jonathan Corbet:
"A set of updates to security-bugs.rst from Willy Tarreau, who says:
Here comes the v2 of a new batch of updates for the security bugs doc,
essentially to make it more readable and to address some of its
apparent contradictions for those not reading it entirely. Some
additions were made to explain how to send a patch and a reproducer
separately, and to ask that first-time reporters send a single report
at once first.
The first patch looks big, it only reorders paragraphs to fix the
current mess resulting from minimal and incremental updates we've done
over the last 6 months in reactions to some repeated mistakes found in
reports. This accumulation has resulted in certain topics being
discussed in a somewhat inconsistent way at different places in the
document.
[25 lines not shown]
hid: Increase HID_ITEM_MAXUSAGE to 32
I have a Logitech mouse that reports 16 buttons. Bump to 32 to be a
little more future proof. This increases the size of struct hid_item
but this struct is not exported to userland.
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D59273
(cherry picked from commit 5cc15fef2656b078982d453b8915379b47ff0e88)
[MachineCombiner]Reassociate FP accumulation chains to expose ILP
Add a target-independent machine combiner pattern, FMA_CHAIN, that
rewrites a chain of FP multiply-accumulations (fused FMA, or unfused
FADD over FMUL) ending at a root into two shorter sub-chains combined
by a single add, roughly halving the chain's critical-path latency. The
split requires the reassoc and nsz flags and no FP exceptions, and is
applied only when it reduces the critical path.
Targets opt in via the new TargetInstrInfo::getFMAChainLinkInfo hook,
which reports the plain-multiply and add opcodes and the accumulator
operand index of a chain link.
Implemented for AArch64 (FMADD, FMLA, and unfused FADD). The split is
applied only when the scheduling model describes the accumulator
forwarding between fused links: models without it, including the
in-order ones used for generic tuning, overestimate the gain.
Based on PPC support, existing in LLVM, but extending it for other
[6 lines not shown]
Enable the internal MSI controller on the SiFive FU740 SoC. This works
around an issue with the firmware where the PCIe controller nodes in the
device tree have an "msi-parent" property that points at the PLIC. But
the PLIC doesn't actually handle MSIs.
Tested by matthieu@
Merge tag 'fixes-2026-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
Pull liveupdate fix from Mike Rapoport:
"debugfs/kho/in/sub_fdts exposes data that KHO users passed from the
previous kernel. KHO does not own that memory, its users may have
already freed it and reading these files can cause a use-after-free.
Drop support for debugfs/kho/in/sub_fdts"
* tag 'fixes-2026-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux:
kho: do not expose incoming sub-blob contents in debugfs
[clang-ssaf-src-edit-merge,apinotes-test] Use an options struct (#247005)
#246760 and #246763 switched these tools to OptTable before #246881 let
a tool parse its command line into a generated options struct. Convert
them as #246881 converted clang-diff.
LLM-aided
[llvm-rc] Support the `MESSAGETABLE` resource type (#234376)
MESSAGETABLE was not a recognized keyword, so it fell through to
parseUserDefinedResource with the token as a string type. The resource
was then emitted under a user-defined type named "MESSAGETABLE" instead
of RT_MESSAGETABLE (11), and FormatMessage(FORMAT_MESSAGE_FROM_HMODULE)
could not find the messages at runtime. Nothing failed at build time.
This affects every .rc file produced by windmc or mc.exe when built
with llvm-rc or llvm-windres (e.g. MSYS2 clang64/clangarm64,
llvm-mingw). Both tools emit a statement like
"1 MESSAGETABLE "MSG00001.bin"", where the file name depends on the
tool and the message language.
Handle it like RCDATA: a user-defined resource with a numeric type ID.
Assisted-by: Claude Opus 5.5