Skip to content

liburing 2.15

Latest

Choose a tag to compare

@axboe axboe released this 29 Jun 20:34

liburing 2.15

Highlights

  • Classic BPF (cBPF) filter support. New io_uring_register_bpf_filter()
    support lets applications attach cBPF programs to restrict which opcodes a
    ring may issue, including ring-level filters, pdu_size validation, and
    filtering of IORING_OP_OPENAT/IORING_OP_OPENAT2. Includes a new
    io_uring_register_bpf_filter.3 man page and extensive tests.
  • New register helpers: io_uring_register_query() and
    io_uring_register_zcrx_ctrl(), each with accompanying man pages
    (io_uring_register_query.3, io_uring_register_zcrx_ctrl.3) and updated
    uapi headers carrying the ZCRX_CTRL opcode.
  • Out-of-source build support. configure now supports building outside
    the source tree, documented in the README and covered by a new CI job.

Library changes and fixes

  • io_uring_peek_cqe(): avoid an out-of-line round trip on an empty CQ, and
    drop the unnecessary acquire ordering on the CQ head load in
    __io_uring_peek_cqe().
  • io_uring_peek_batch_cqe(): correctly handle mixed (16/32-byte) CQE rings.
  • Don't return a stale CQE pointer when a timeout error occurs.
  • io_uring_wait_cqes_min_timeout() now returns -EINVAL when unsupported.
  • Fix a NULL deref in _io_uring_get_cqe() on the EXT_ARG_REG path.
  • io_uring_resize_rings(): fix an mmap leak, and preserve / clean up old ring
    state on a failed mmap remap.
  • setup: account the SQ array in rings_size() and in io_uring_alloc_huge(),
    explicitly request 2MB huge pages, and restore ring fd/flags init in
    io_uring_queue_mmap().
  • arch: use prlimit64 for the rlimit syscall wrappers, and use sysconf()
    for page size on aarch64/riscv64 libc builds.
  • sanitize: check secondary user pointers as well, and initialize the handler
    table at compile time.
  • Reject a negative op in io_uring_opcode_supported().
  • Fix integer overflow in recvmsg_validate() / payload length wraparound.
  • nolibc: fix integer overflow in __uring_malloc.
  • Ensure __io_uring_peek_cqe() is exported for FFI, make the iter helpers
    IOURINGINLINE, and add the missing iter helpers to the FFI map.
  • io_uring_cqe_nr: assign the shift value to an unsigned int upfront.

Man pages

  • Add io_uring_register_bpf_filter.3, io_uring_register_query.3, and
    io_uring_register_zcrx_ctrl.3.
  • Document the IORING_TIMEOUT_IMMEDIATE_ARG flag and that immediate absolute
    timeouts are allowed; fix timeout update flags to match the kernel.
  • Explain transfer size limits across all read/write/send/recv functions and
    misc helpers; clarify unsigned input vs. __s32 output in
    io_uring_prep_read.3.
  • Explain the -ENOMEM return from io_uring_queue_init().
  • Update io_uring_buf_reg documentation, document missing opcodes in
    io_uring_prep_cmd_sock.3, mention the length cap in
    io_uring_prep_recv.3, and fix IOPOLL-related notes.
  • Assorted typo and language fixes.

Build, CI and configure

  • Upgrade CI clang to version 22 and fix the resulting over-eager warnings.
  • Harden CI workflow security.
  • Fix missing bpf_filter.h installation and add it as an installed header.
  • Various configure fixes: Alpine mktemp handling, BPF/clang detection,
    ensure bpftool is found when not in PATH, and silence assorted unused
    variable/parameter warnings.

Tests and examples

  • New tests for cBPF filters (including IORING_OP_CONNECT), mixed-CQE peek
    batching, ring resize with pending large CQEs/SQEs and failed mmap remap,
    buffer-ring upgrade/drain-refill, multishot accept/recv stress, per-task
    restrictions, cancel-vs-completion races, fixed file table regressions
    (including a fixed file leak test), immediate/absolute timeouts, and timens
    regressions.
  • Many fixes to make tests skip cleanly on older kernels and run correctly as
    root, plus zcrx test improvements.
  • examples: add a minimal multishot echo server; assorted fixes to
    io_uring-udp, link-cp, proxy, ucontext-cp, send-zerocopy, and
    zcrx.

Contributors

Thanks to everyone who contributed to this release:

Ahmed Abdelmoemen, Alb3e3, Ammar Faizi, Andrew Sayers, Caleb Sander Mateos,
Christian A. Ehrhardt, Guillem Jover, Haiyue Wang, Håkon F. Fjellanger,
Jiri Pospisil, KaFai Wan, Maoyi Xie, Pavel Begunkov, Prateek,
Sebastian Chlad, Shouvik Kar, Tom Ryan, Travis Downs, XananasX, Yang Xiuwei,
Yitang Yang, YooLCD, Zile Xiong, mag1c1an1, rootvector2, uwezkhan06.