Merge tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull kmalloc_obj conversions from Kees Cook:
"Another run of the Coccinelle script for converting kmalloc()
family of allocations to kmalloc_obj() via the existing rules
in scripts/coccinelle/api/kmalloc_objs.cocci"
* tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
treewide: refresh kmalloc_obj() conversions
drm/amd/display: Fix harmless type mismatch in allocation
[clang][bytecode] Cache Is(Unnamed)BitFields bools in `Record::Field` (#221392)
We need to query those a lot and we can save them in the padding bytes
of `Record::Field`.
[include-cleaner] Add WalkAST unit tests for Objective-C constructs (#220763)
Adds test coverage for walking AST nodes related to:
- Objective-C interface inheritance (`@interface Derived : Base`)
- Forward class and protocol declarations (`@class` and `@protocol`)
- Objective-C interface types used as function arguments
This is just to make sure that current code is covered. No new features.
[X86] Lower i64 vector division and remainder through float division (#215043)
Follow up to #205263 which handled i8/i16/i32.
i64 needs a different algorithm because f64 cannot hold a 64 bit
quotient exactly. Instead of one divide the quotient is built from a
reciprocal and two rounded down multiplies plus a correction for the off
by one (https://sneller.ai/blog/avx512-int-div/). That needs the
directed rounding forms which only exist as 512 bit AVX512DQ
instructions, so the whole i64 path is gated on DQ and 512 bit types
being legal.
Operands that are provably narrow enough to fit the f64 mantissa skip
the chain entirely and take the same convert divide convert path as the
<=i32 case.
strictfp i64 uses the SAE forms the same way the <=i32 path does.
combineIntDivRem is now a small dispatcher over two helpers since the
[4 lines not shown]
ixgbe: Probe additional controller variants
The shared base code already selects and configures the 82598 BX,
82599 KR, 82599 SFP Express Module, X552 XFI, X553 QSFP, and X553 N
QSFP device IDs, but the FreeBSD probe table omits them while DPDK lists
them.
Sponsored by: BBOX.io
(cherry picked from commit 27f0491e3648722a892558416a768dda77850ad9)
amd_iommu: Bound IVHD device-entry parsing
Validate the IVRS table and every subtable length before using either
to form iterator bounds. Reject truncated typed IVHD blocks instead of
passing them to a type-specific callback.
Within each IVHD payload, correct the lower-bound comparison for
extended range entries and validate fixed-size entries, paired range
terminators, the fixed HID body, and the variable HID UID before
dereferencing or advancing. Malformed firmware can no longer drive
either iterator beyond its enclosing object.
Reviewed by: kib
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D58724
(cherry picked from commit 4a2494d76ad03c755f2cb0ed5e1311b03bb2a8e2)
amd_iommu: Bound IVHD device-entry parsing
Validate the IVRS table and every subtable length before using either
to form iterator bounds. Reject truncated typed IVHD blocks instead of
passing them to a type-specific callback.
Within each IVHD payload, correct the lower-bound comparison for
extended range entries and validate fixed-size entries, paired range
terminators, the fixed HID body, and the variable HID UID before
dereferencing or advancing. Malformed firmware can no longer drive
either iterator beyond its enclosing object.
Reviewed by: kib
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D58724
(cherry picked from commit 4a2494d76ad03c755f2cb0ed5e1311b03bb2a8e2)
ixgbe: Probe additional controller variants
The shared base code already selects and configures the 82598 BX,
82599 KR, 82599 SFP Express Module, X552 XFI, X553 QSFP, and X553 N
QSFP device IDs, but the FreeBSD probe table omits them while DPDK lists
them.
Sponsored by: BBOX.io
(cherry picked from commit 27f0491e3648722a892558416a768dda77850ad9)
igb: Report 82580 memory ECC errors
82580 exposes clear-on-read, saturating corrected error counters for
the receive and transmit packet buffers. Its two PCIe command memories
expose RW1C indications for uncorrectable ECC errors.
Sample the packet buffer counters and PCIe indications from the regular
hardware statistics update. Fatal recovery samples the PCIe indications
from the serialized admin path rather than the interrupt filter. Thus,
either the regular statistics pass or recovery reads and clears each
indication, but they cannot both account it. Also preserve indications
observed while initialization is completing.
Expose the exact packet buffer error total and observed PCIe command
memory indications under the memory_errors sysctl node. Multiple PCIe
errors between samples can collapse into one indication per memory.
Validated on an Intel I340-T2 (82580, revision 1). A clean boot and
three down/up cycles left the packet-buffer, PCIe, and region-specific
[11 lines not shown]
e1000: Recover from 82580 memory errors
82580 reports fatal parity and uncorrectable ECC errors through ICR.FER
and its four region PEIND hierarchy. Region specific status registers
identify PCIe, DMA transmit, DMA receive, DMA host, and LAN port
memories that can leave traffic stopped.
Enable the documented DMA, PCIe, packet-buffer, and host-owned LAN
parity and ECC checks only after initializing queue and filter tables.
Leave the flexible filter parity controls under management firmware
ownership. Capture read-clear and RW1C status in the interrupt filter
and keep FER masked until the admin task resolves the event.
Reset for a host-owned region or an unknown FER source. Leave
management-only recovery to firmware. Use CTRL.RST before master
disable because fatal 82580 memory errors can stop PCIe traffic. Do not
use CTRL.DEV_RST: specification update item 9 declares that bit reserved
and says it must always be written as zero. Wait for EEPROM auto read
completion; STATUS bit 21 is reserved on 82580, not PF_RST_DONE.
[22 lines not shown]
Reapply "[SandboxIR] Callback registration now allows specifying order" (#221099)
This reverts commit f111407c0502851409a887c8e5dea4a3ec190d4e.
Should fix the sanitizer issue.
[CIR][OpenCL] Lower OpenCL language version metadata to LLVM dialect
Propagate CIR OpenCL language version module attributes as LLVM dialect named metadata before LLVM IR translation.
Assisted-by: Codex / GPT-5.6 Sol
fix: Supply the HIP SPIR-V version only for metadata emission
Fix the assertion exposed by PR #214246 under the version invariant from PR #219687. Supply OpenCL 2.0 in classic CodeGen and CIRGen without changing HIP language options or enabling OpenCL-only Sema restrictions.
Assisted-by: Codex / GPT-6
[CIR][OpenCL] Emit OpenCL language version metadata in CIR
Emit OpenCL and C++ for OpenCL language version attributes from CIRGen. Preserve the compatible OpenCL version and the C++ for OpenCL version separately so later lowering does not infer one from the other.
Assisted-by: Codex / GPT-5.6 Sol
[CIR][OpenCL] Add OpenCL language version module attributes
Add structured CIR module attributes for OpenCL and C++ for OpenCL language versions. Verify their module-level placement and version components so lowering can consume explicit source-language version state.
Assisted-by: Codex / GPT-5.6 Sol
pmc: avoid illegal flexible array member
Remove struct pmchdr_cpuidinfo which was just a wrapper around a
flexible array member of uint32_t. Flexible array members are
non-standard in C++, and even in C are not allowed as the only member
of a struct.
GCC errored out on pmchdr_cpuidinfo, but did not complain about
pmchdr_pmcinfo, so I left it alone here, though it is also non-standard.
Fixes: 93da997ef759 ("pmc: new pmc log processing framework")
Reviewed by: Ali Mashtizadeh <ali at mashtizadeh.com>
Differential Revision: https://reviews.freebsd.org/D59355
find.1: fix rendering of find -s example
The period here is part of the literal string in the example. Adding a
space caused the example to be quoted wrongly. Instead, a trailing
zero-width space keeps the linter mandoc -T happy.
Reviewed by: ziaee
Differential Revision: https://reviews.freebsd.org/D59353
LinuxKPI: implement dma_sync_sg_for_{cpu, device}()
Implement dma_sync_sg_for_{cpu, device}() and
dma_sync_sgtable_for_device().
These functions are useful for my GSoC 2026 project, udmabuf.
Reviewed by: bz
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D57766
LinuxKPI: Correct nents passed to dma_{un,}map_sg_attrs()
According to Linux documentation the nents argument to dma_unmap_sg()
must be the number one passed in, not the number of DMA addresses.
In LinuxKPI this means orig_nents and not nents, so adjust this.
Given nents and orig_nents should always be the same in LinuxKPI,
this should only be a NOP for correctness.
Reviewed by: bz, aokblast (LGTM)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D57842
pciconf: extend tree mode to also print numerical IDs
Also print the vendor/device and subvendor/subdevice IDs in addition
to any strings from the database found if the -v flag is given more
than once.
This helps with device identification if the strings resolve to
identical values for entire product families as well as when the
exact card cannot be determined from the string.
In theory a second call to pciconf could present that information in
non-tree mode but that kind-of defeats the purpose.
Reviewed by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D56248
[TableGen] Unique the remaining Init pools in a UniquingSet. NFC (#221394)
Follow-up to #219630. Every one of these keys is a handful of scalars,
pointers and trailing-object arrays already stored in the node, so a
typed key removes the FoldingSetNodeID serialization on every get() and
the profile rebuild on every hit.
llvm-tblgen instructions retired, minimum of five interleaved runs:
```
RISCV -gen-asm-matcher -3.492%
RISCV -gen-register-info -4.027%
X86 -gen-dag-isel -1.573%
AMDGPU -gen-subtarget -1.140%
```
Aided by Opus 5