[LifetimeSafety] Support C Language in LifetimeSafety (#203270)
There are a few constraints that make supporting C a bit cumbersome:
* C assignment expressions are rvalues, unlike C++ assignment
expressions. The analysis has to account for the different origin shape
of the assignment result by stripping an origin from `LHSExpr`.
* Function addresses in C do not need lifetime tracking. Taking `&f`
should not create origins because functions do not have local object
lifetime (unlike in C++).
* GNU C permits `void*` subscripting/pointer arithmetic. Expressions
like `bytes[0]` (where `bytes` is `void*`) have type `void` and do not
produce an addressable object with origins, even though `void*` itself
can carry pointer origins.
* Some C subscripts, such as vector subscripts, are not GLValues, so
they do not have storage origins to track.
* `va_arg(ap, array_type)` is undefined behavior, so we skip it instead
of trying to model origins for it.
* C does not have a spelling for `[[gsl::Owner]]` / `[[gsl::Pointer]]`,
[21 lines not shown]
[NVPTX] Don't force the mask() path for widening ptrtoint in aggregate initializers.
After #201217, global-ordering.ll crashes on the 32-bit nvptx triple with
LLVM ERROR: initialized packed aggregate with pointers 'sadd' requires at least PTX ISA version 7.1
for
@sadd = addrspace(1) global { i64, i64 }
{ i64 add (i64 ptrtoint (ptr addrspace(1) @g to i64), i64 4), i64 7 }
That PR added allSymbolsFullPtrSize, which forces the per-byte mask() path
whenever a symbol's slot size differs from the pointer size. The intent was
to catch *narrowing* ptrtoint (an i32 slot on a 64-bit target), where emitting
a full pointer word would clobber the next field. But here the ptrtoint is
*widening* -- an i64 slot on a 32-bit target -- and the word path already
handles that fine: it emits the symbol as one 32-bit word and the remaining
zero-extension bytes come from the buffer as 0 words.
[7 lines not shown]
Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd
Pull iommufd updates from Jason Gunthorpe:
"All various fixes:
- Typo breaking the veventq uAPI for 32 bit userspace
- Several Sashiko found errors in the veventq and fault fd paths
- Fix incorrect use of dmabuf locks, and possible races with iommufd
destroy and dmabuf revoke
- Sashiko errors found in the uAPI validation for IOMMU_HWPT_INVALIDATE"
* tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd:
iommu: Avoid copying the user array twice in the full-array copy helper
iommufd/selftest: Add invalidation entry_num and entry_len boundary tests
iommufd: Set upper bounds on cache invalidation entry_num and entry_len
iommufd: Clarify IOAS_MAP_FILE dma-buf support
[14 lines not shown]
NAS-141437 / 26.0.0-RC.1 / Ensure oath users file entries are always valid (by anodos325) (#19160)
If we have an invalid TOTP entry (interval not supported by liboath)
then lookups will fail with OATH_UNKNOWN_USER, which is an incorrect
response when we'd expect rather to have an explicit failure mode. API
model / more thorough changes are tracked in NAS-141431.
Original PR: https://github.com/truenas/middleware/pull/19159
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
iflib: Fix mbufs leaked by 0 len packets emitted from the if driver
Some interface drivers, notably bnxt, can insert 0 length packets onto
their receive queues when certain conditions are met, such as discarding
packets in the case of bnxt.
When this packet gets processed by assemble_segments(), The solitary
mbuf on the queue that composes it consist of a single zero length
fragment. The loop in assemble_segments() doesn't seem to expect
that a 0 length fragment can exist in the iri_frags list without a
non-zero length header preceding it. In this situation, without filter
intervention rxd_frag_to_sd() returns a pointer to the corresponding
mbuf in the rxq, where it is matched as a zero-length fragment and
immediately discarded without freeing as mh has not yet been assigned.
This change corrects this behavior by falling through the mh == NULL
case and freeing m on the condition that it is not NULL before
continuing the loop.
[3 lines not shown]
Merge tag 'iommu-updates-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux
Pull iommu updates from Joerg Roedel:
"Core Code:
- Fix dma-iommu scatterlist length handling in the P2PDMA path
- Extend the generic IOMMU page-table code with detailed gather
support for more precise invalidations
- Add pending-gather tracking to generic page-table invalidation
handling
- Add support for smaller virtual address sizes in the generic AMDv1
page-table format, including KUnit coverage
- Fix page-size bitmap calculation for smaller VA configurations
- Rework Arm io-pgtable allocation/freeing to consistently use the
[99 lines not shown]
[AMDGPU][docs] Remove abandoned augementation-related changes
These haven't been carried forward in the DWARF committee proposal, and
we don't expect them to standardized (at least in the form presented
here). Drop them to avoid confusion.
Change-Id: I60dd6ffb5df1bb63d132733466ecf3d697f79276
[AMDGPU][docs] Correct DWARF extension attribute encodings
These were not updated when the final numbers were committed in
Dwarf.def, so update them now.
Change-Id: Ide931b835dc2c5def60dd7fad29525f598e8c8b6
Merge tag 'dma-mapping-7.2-2026-06-16' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux
Pull dma-mapping updates from Marek Szyprowski:
- added checks for DMA attributes in the debug code, especially to
ensure that mappings are created and released with matching
attributes (Leon Romanovsky)
- better default configuration for CMA on NUMA machines (Feng Tang)
- code cleanup in dma benchmark tool (Rosen Penev)
* tag 'dma-mapping-7.2-2026-06-16' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux:
dma: map_benchmark: turn dma_sg_map_param buf into a flexible array
dma-contiguous: simplify numa cma area handling
dma-contiguous: add kconfig option to setup numa cma area if not configured explicitly
dma-debug: Ensure mappings are created and released with matching attributes
dma-debug: Feed DMA attribute for unmapping flows too
dma-debug: Record DMA attributes in debug entry
[3 lines not shown]
Merge tag 'memblock-v7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
Pull memblock updates from Mike Rapoport:
"Small fixes and a cleanup:
- numa emulation: fix detection of under-allocated emulated nodes
- memblock tests: fix NUMA tests to properly differentiate reserved
areas with differnet flags
- mm_init: use div64_ul() instead of do_div() to better express the
intent of the division"
* tag 'memblock-v7.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
mm: mm_init: use div64_ul() instead of do_div()
tools/testing/memblock: fix stale NUMA reservation tests
mm/fake-numa: fix under-allocation detection in uniform split
NAS-141208 / 26.0.0-RC.1 / don't process IPv6 RAs when autoconfigure is disabled (by yocalebo) (#19158)
Disabling "Autoconfigure IPv6" on an interface only set
net.ipv6.conf.<if>.autoconf=0, which stops SLAAC address assignment but
not the kernel's processing of Router Advertisements. As a result,
RA-derived routes (including an IPv6 default route) were still installed
on interfaces that had autoconf disabled. The accept_ra sysctl that
actually controls this was never managed alongside autoconf, and docker
made it worse by force-setting accept_ra=2 on every physical interface.
This sets accept_ra in lockstep with autoconf during interface sync (2
when IPv6 autoconf is enabled, so RAs are still honored once docker
enables ipv6 forwarding, and 0 when disabled) and removes docker's
blanket override so the per-interface value sticks.
Original PR: https://github.com/truenas/middleware/pull/19150
Co-authored-by: Caleb St. John <30729806+yocalebo at users.noreply.github.com>
Merge tag 'livepatching-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
Pull livepatching updates from Petr Mladek:
- Fix a potential memory leak in a selftest module
- Make selftests locale independent
- Allow running the selftest with older kernels back to 4.12
* tag 'livepatching-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
selftests/livepatch: fix resource leak in test_klp_syscall init error path
selftests: livepatch: set LC_ALL=C to fix locale-dependent test failure
selftests: livepatch: Check if stack_order sysfs attribute exists
selftests: livepatch: Check if replace sysfs attribute exists
selftests: livepatch: Check if patched sysfs attribute exists
selftests: livepatch: Introduce does_sysfs_exist function
selftests: livepatch: Replace true/false module parameter by y/n
selftests: livepatch: Check for ARCH_HAS_SYSCALL_WRAPPER config
[VPlan] Also expand SCEVUDivExpr in expandSCEVExpr. (#203093)
Add support for expanding SCEVUDivExpr to VPInstructions, completing the
set of SCEV expression kinds that can be fully expanded without falling
back to SCEVExpander.
PR: https://github.com/llvm/llvm-project/pull/203093
Merge tag 'printk-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk updates from Petr Mladek:
- Add upper case flavor for printing MAC addresses (%p[mM][U]) and use
it in the nintendo driver
- Fix matching of hash_pointers= parameter modes
- Fix size check of vsprintf() field_width and precision values
- Add check of size returned by vsprintf()
- Add KUnit test for restricted pointer printing (%pK)
- Some code cleanup
* tag 'printk-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
HID: nintendo: Use %pM format specifier for MAC addresses
[8 lines not shown]
Add the ability to look up persistent types and variables defined in the expression parser through the SB API's. (#203128)
In responding to the question here:
https://discourse.llvm.org/t/creating-nested-synthetic-children/90997/3
it became clear that getting the persistent variable/type results from
the expression parser was much harder than it needed to be. I filed a
couple issues for this:
https://github.com/llvm/llvm-project/issues/201952https://github.com/llvm/llvm-project/issues/201949
though after thinking about this a bit more, I decided to go with
dedicated API for getting Persistent Expression variables & types. We
don't allow redefinitions of persistent variables and types within the
same Target, so a "FirstType" API didn't make sense, nor did one
returning a list of types or values.
Plus, this will be easier to discover.
Merge tag 'devicetree-for-7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree updates from Rob Herring:
"DT core:
- Add support for handling multiple cells in "iommu-map" entries
- Support only 1 entry in /reserved-memory "reg" entries. Support for
more than 1 entry has been broken
- Fix a UAF on alloc_reserved_mem_array() failure
- Make "ibm,phandle" handling logic specific to PPC
- Use memcpy() instead of strcpy() for known length strings
- Ensure __of_find_n_match_cpu_property() handles malformed "reg"
entries
[52 lines not shown]
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio updates from Michael Tsirkin:
- new virtio CAN driver
- support for LoongArch architecture in fw_cfg
- support for firmware notifications in vdpa/octeon_ep
- support for VFs in virtio core
- fixes, cleanups all over the place, notably:
- vhost: fix vhost_get_avail_idx for a non empty ring
fixing an significant old perf regression
- READ_ONCE() annotations mean virtio ring is now
free of KCSAN warnings
[23 lines not shown]