Search arXiv⌕ Search

arXiv · 2612.04862

Quietus: Detecting False Finality in DMA Buffer Reclamation

Abstract

Direct memory access (DMA) lets devices read and write memory independently of the CPU, so a driver can safely hand a buffer to a new owner only after every operation that can access that memory has finished. In practice, however, drivers often release or reuse buffers right after requesting a stop or observing a single completion event, which lets queued descriptors, asynchronous completion callbacks, or deferred bounce-buffer copybacks outlive that handoff and overwrite memory that now belongs to the new owner. We call this failure false finality, and catching it requires tracking operations across execution contexts while accounting for the actual retirement guarantees of the underlying DMA provider. We present QUIETUS, a framework that detects unsafe DMA buffer reclamation by checking authority-set finality, the requirement that no hardware or software operation from a buffer's previous use can still access it once a new owner takes over. We formalize this property in Lean and build a verified checker that analyzes reconstructed driver lifecycles using each DMA provider's retirement guarantees. The checker shows how each reported violation occurs within the model and establishes safe retirement only when every modeled path is safe. We applied QUIETUS to Linux and Zephyr and uncovered 32 machine-checked DMA lifecycle violations across 29 drivers, and reproduced representative violations on physical hardware and in kernel emulation, demonstrating writes into a new owner's memory on embedded hardware and use-after-free writes in Linux.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Samarth Narang, Brandon Reagen. 2026-12-03. Quietus: Detecting False Finality in DMA Buffer Reclamation. https://searcharxiv.org/abs/2612.04862

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

High-Efficient Deduplication for Cloud-Native AI Container Images

Container images are becoming increasingly large and frequently updated, particularly for AI/ML workloads, making storage consumption and startup latency major deployment challenges. On-demand loading reduces startup overhead by fetching only the data actually accessed, while cross-image deduplication reduces storage redundancy. However, existing deduplication approaches can interfere with on-demand loading by introducing runtime lookup overhead, fragmenting remote accesses, and amplifying data and metadata reads, thereby offsetting the benefits of deduplication. In this work, we present SLIDE, a cross image deduplication system for Nydus style container images. SLIDE clusters similar image regions, preserves locality during remote deduplication, and defers locality violating reuse until data are cached locally. It also uses per image reference bitmaps and paged blob metadata to avoid unnecessary prefetching and metadata reads. We implement SLIDE on Nydus and evaluate it across AI/ML images. Our results show that SLIDE substantially reduces both storage footprint and startup latency while preserving efficient on-demand loading.

cs.OS↗

Lightning-Speed Futexes

In the Linux kernel, the futex primitive lets one or several threads sleep until another thread wakes them up. Futexes can be used to implement barriers, in which a futex wake-all is used to release all waiting threads. A wake-all is performed serially: the waker first waits on the lock that protects the list of sleeping threads, behind the threads it is about to wake, then walks a list of threads to collect the threads, and finally wakes them one at a time. We propose an approach that improves the performance of all three steps. Our approach places an abort gate in front of the lock, an admission stage that allows the waker to abort, in constant time, the lock acquisitions queued ahead of it; the waker then detaches the full set of waiters in one step instead of collecting them one by one; and finally it parallelizes the wake-ups by recruiting each woken thread to wake further threads. We implement our approach in the futex subsystem of Linux 6.19. On six Intel, AMD, and ARM servers, our approach speeds up the barrier-intensive NAS kernels by 1.3$\times$ to 1.9$\times$ on geometric mean, depending on the input class, and 45 barrier-heavy applications by 2.1$\times$ on geometric mean, with peak speedups of 4.4$\times$ and 6.2$\times$.

cs.OS↗

Hotness Fragmentation Limits Linux Proactive Reclaim: An Experimental Study of Object Placement, zswap, and cgroup v2 memory.reclaim

Data centers reclaim memory from running jobs to fit more work on each server, but Linux decides what to reclaim one 4 KiB page at a time while applications use memory one small object at a time. Banakar et al. (2026) call the resulting waste hotness fragmentation: a single frequently used object keeps an entire page resident, together with the cold bytes around it. This paper measures how much memory that costs a stock Linux kernel. A purpose-built C workload places the same number of hot 64-byte objects in a 4 GiB arena either scattered at random or packed contiguously, and a driver reclaims memory in steps through cgroup v2 memory.reclaim into zswap with disk writeback disabled. Across 36 runs (two layouts, hot sets of 1%, 5% and 20%, lz4 and zstd compressors, three repetitions), packing saved 40.0-69.7% of memory, while scattering saved 0-37.0%. At a 5% hot set the gap was 48.0% against 1.9% with lz4. With the compression ratio measured from zswap's counters, savings matched a simple model, the fraction of pages holding no hot object times one minus the inverse compression ratio, to within one percentage point in every configuration, and to within 0.02 points when measured against the arena alone. Reclaiming cold pages caused no lasting slowdown; reclaiming beyond them evicted hot pages that faulted straight back in, costing a median 1.3-2.7 times the baseline loop time while saving nothing. Two validity problems found during pilot runs, swap readahead and shared-cache timing noise, are reported with their fixes.

cs.OS↗