Skip to content

[GIT PULL] src/liburing-ffi.map: add io_uring_buf_ring_head - #1658

Merged
axboe merged 1 commit into
axboe:masterfrom
ilyas-mallah:ffi-map-buf-ring-head
Oct 21, 2026
Merged

axboe merged 1 commit into
axboe:masterfrom
ilyas-mallah:ffi-map-buf-ring-head

Conversation

@ilyas-mallah

Copy link
Copy Markdown
Contributor

liburing-ffi.so doesn't export io_uring_buf_ring_head(), so a C program that links it gets an undefined reference and a binding gets NULL from dlsym(). Commit 9304009 named it in its title but only added io_uring_buf_ring_available to liburing-ffi.map.

I put it in LIBURING_2.16, the current development node. Listing it under LIBURING_2.6 would claim that released versions of liburing-ffi.so had it. liburing.so is unchanged and keeps it at LIBURING_2.6.

I linked a small program that calls it on a fresh ring against liburing-ffi.so.2.15, before and after the change:

before: undefined reference to `io_uring_buf_ring_head'
        dlsym(handle, "io_uring_buf_ring_head") -> (nil)
after:  nm -D: T io_uring_buf_ring_head@@LIBURING_2.16
        dlsym(handle, "io_uring_buf_ring_head") -> 0x7f6105028370
        io_uring_buf_ring_head() -> -22 (from the kernel, 5.15 has no IORING_REGISTER_PBUF_STATUS)

It was the only name in liburing.map missing from liburing-ffi.map, and this prints nothing after the change:

comm -23 <(grep -oP '^\s+\K\w+(?=;)' src/liburing.map | sort -u) <(grep -oP '^\s+\K\w+(?=;)' src/liburing-ffi.map | sort -u)

The tree builds with make -j4. I added no test, since nothing in test/ links against liburing-ffi.


git request-pull output:

The following changes since commit f4fdfd910ad15e5477c68f2eec208581e3f2239e:

  test/waitid: test a non-blocking pidfd (2026-10-19 15:03:12 -0600)

are available in the Git repository at:

  https://github.com/ilyas-mallah/liburing ffi-map-buf-ring-head

for you to fetch changes up to acbe866a91a76737d343bae63de782e73234a537:

  src/liburing-ffi.map: add io_uring_buf_ring_head (2026-10-20 03:33:01 +0200)

----------------------------------------------------------------
Ilyas Mallah (1):
      src/liburing-ffi.map: add io_uring_buf_ring_head

 src/liburing-ffi.map | 1 +
 1 file changed, 1 insertion(+)

Click to show/hide pull request guidelines

Pull Request Guidelines

  1. To make everyone easily filter pull request from the email
    notification, use [GIT PULL] as a prefix in your PR title.
[GIT PULL] Your Pull Request Title
  1. Follow the commit message format rules below.
  2. Follow the Linux kernel coding style (see: https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst).

Commit message format rules:

  1. The first line is title (don't be more than 72 chars if possible).
  2. Then an empty line.
  3. Then a description (may be omitted for truly trivial changes).
  4. Then an empty line again (if it has a description).
  5. Then a Signed-off-by tag with your real name and email. For example:
Signed-off-by: Foo Bar <foo.bar@gmail.com>

The description should be word-wrapped at 72 chars. Some things should
not be word-wrapped. They may be some kind of quoted text - long
compiler error messages, oops reports, Link, etc. (things that have a
certain specific format).

Note that all of this goes in the commit message, not in the pull
request text. The pull request text should introduce what this pull
request does, and each commit message should explain the rationale for
why that particular change was made. The git tree is canonical source
of truth, not github.

Each patch should do one thing, and one thing only. If you find yourself
writing an explanation for why a patch is fixing multiple issues, that's
a good indication that the change should be split into separate patches.

If the commit is a fix for an issue, add a Fixes tag with the issue
URL.

Don't use GitHub anonymous email like this as the commit author:

123456789+username@users.noreply.github.com

Use a real email address!

Commit message example:

src/queue: don't flush SQ ring for new wait interface

If we have IORING_FEAT_EXT_ARG, then timeouts are done through the
syscall instead of by posting an internal timeout. This was done
to be both more efficient, but also to enable multi-threaded use
the wait side. If we touch the SQ state by flushing it, that isn't
safe without synchronization.

Fixes: https://github.com/axboe/liburing/issues/402
Signed-off-by: Jens Axboe <axboe@kernel.dk>

By submitting this pull request, I acknowledge that:

  1. I have followed the above pull request guidelines.
  2. I have the rights to submit this work under the same license.
  3. I agree to a Developer Certificate of Origin (see https://developercertificate.org for more information).

Fixes: 9304009 ("Add io_uring_buf_ring_head/available() to the exported list")
Signed-off-by: Ilyas Mallah <github@ilyasm.dev>
@axboe
axboe merged commit 73e93df into axboe:master Oct 21, 2026
20 checks passed
@ilyas-mallah
ilyas-mallah deleted the ffi-map-buf-ring-head branch October 21, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants