Skip to content

Conversation

@doyleish
Copy link
Contributor

The io_uring_setup syscall may fail with EINVAL when called with the IORING_SETUP_SINGLE_ISSUER flag bit before support for that flag was added (linux 6.0). This would help the user deduce quickly that a kernel upgrade is required.

The io_uring_setup syscall may fail with EINVAL when called with the
IORING_SETUP_SINGLE_ISSUER flag bit before support for that flag was
added (linux 6.0).  This would help the user deduce quickly that a
kernel upgrade is required.
@doyleish doyleish marked this pull request as ready for review October 28, 2025 20:35
/// The device has permission to use io_uring, but does not support the flags required
/// for io_uring_setup. NOMT uses the IORING_SETUP_SINGLE_ISSUER flag for io_uring which
/// was introduced in linux 6.0.
MissingFlagSupport,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the additional detection!

Unfortunately, this is a breaking change in the public API (all users matching on the IoUringPermission would have their code break after adding this additional variant)

How about we still return "Denied", but print a detailed warning message?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I pushed a commit which returns NotSupported and prints an error containing the text you provided. Thanks for investigating and upstreaming the fix)

@rphmeier rphmeier merged commit 8d39cec into thrumdev:master Nov 1, 2025
Comment on lines +25 to +30
println!("
The device has permission to use io_uring, but does not support the flags required
for io_uring_setup. NOMT uses the IORING_SETUP_SINGLE_ISSUER flag for io_uring which
was introduced in linux 6.0. Please update your kernel to at least version 6.0
to use NOMT with io_uring.
");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multiline string literal includes all leading whitespace from the source code indentation. This will print with awkward indentation in the output.

The message will be displayed as:

(blank line)
                The device has permission...
                for io_uring_setup...
                ...

Fix by removing indentation inside the string:

println!("The device has permission to use io_uring, but does not support the flags required \
for io_uring_setup. NOMT uses the IORING_SETUP_SINGLE_ISSUER flag for io_uring which \
was introduced in linux 6.0. Please update your kernel to at least version 6.0 \
to use NOMT with io_uring.");

Or use eprintln! for error messages instead of println!.

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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.

3 participants