test/sqe-mixed-boundary: validate physical SQE index for 128-byte ops
PATCH v2 1/1 test/sqe-mixed-boundary: validate physical SQE index for 128-byte ops
Add a test for the kernel fix that replaces the cached_sq_head alignment check with physical SQE index validation in io_init_req() for SQE_MIXED 128-byte operations.
test_valid_position: verifies that a NOP128 at a valid physical slot (identity-mapped via sq_array) succeeds.
test_oob_boundary: verifies that a NOP128 remapped via sq_array to the last physical SQE slot is rejected with -EINVAL, preventing a 64-byte OOB read past the SQE array.
---
v1 -> v2:
- Use t_io_uring_init_sqarray() to bypass NO_SQARRAY fallback, ensuring sq_array is available for physical index remapping
- Fix CQE wait loop count (2 SQEs submitted, not 3)
- Build-tested and run-tested on Linux 7.0.0-rc3 ARM64
test/Makefile | 1 + test/sqe-mixed-boundary.c | 184 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 test/sqe-mixed-boundary.c
test/Makefile +1 -0
@@ -253,6 +253,7 @@ test_srcs := \ sq-poll-share.c \ sqpoll-sleep.c \ sq-space_left.c \ + sqe-mixed-boundary.c \ sqe-mixed-nop.c \ sqe-mixed-bad-wrap.c \ sqe-mixed-uring_cmd.c \
test/sqe-mixed-boundary.c new file +184 -0
184 lines not on this page · raw message
Signature · 1 line
2.50.1 (Apple Git-155)
Quoted 8 lines · Tom Ryan
Add a test for the kernel fix that replaces the
cached_sq_headalignment check with physical SQE index validation inio_init_req()forSQE_MIXED128-byte operations.
test_valid_position: verifies that a NOP128 at a valid physical slot (identity-mapped viasq_array) succeeds.[...]
Applied, thanks!
[1/1] test/sqe-mixed-boundary: validate physical SQE index for 128-byte ops
commit: a35e4943ec95af0aba795a58fd9d680a54406dc5
Best regards,
Signature · 1 line
Jens Axboe