public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] io_uring: Add macro to validate SQE cmd size
@ 2026-01-29 20:13 Govindarajulu Varadarajan
  2026-01-29 20:13 ` [PATCH 1/2] io_uring: Add size check for sqe->cmd Govindarajulu Varadarajan
  2026-01-29 20:13 ` [PATCH 2/2] block/ublk_drv: Validate SQE128 flag before accessing the cmd Govindarajulu Varadarajan
  0 siblings, 2 replies; 6+ messages in thread
From: Govindarajulu Varadarajan @ 2026-01-29 20:13 UTC (permalink / raw)
  To: io-uring, axboe
  Cc: ming.lei, kbusch, hch, sagi, miklos, Govindarajulu Varadarajan

This patch series introduces macros IO_URING_SQE_CMD() and
IO_URING_SQE128_CMD() for accessing cmd struct from io_uring SQEs,
providing compile-time type checking and size validation. The series
also updates ublk driver to check the SQE128 flag before accessing the
cmd structure.

Testing:
- Compile test only. (trivial changes)
- Validated IO_URING_SQE_CMD() and IO_URING_SQE128_CMD() with struct
  size < 16, = 16, > 16 for IO_URING_SQE_CMD() and < 80, = 80, > 80 for
  IO_URING_SQE128_CMD().

Govindarajulu Varadarajan (2):
  io_uring: Add size check for sqe->cmd
  block/ublk_drv: Validate SQE128 flag before accessing the cmd

 drivers/block/ublk_drv.c     | 20 +++++++++++---------
 drivers/nvme/host/ioctl.c    |  2 +-
 fs/fuse/dev_uring.c          |  6 ++++--
 include/linux/io_uring/cmd.h | 15 +++++++++++----
 4 files changed, 27 insertions(+), 16 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-30  5:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-29 20:13 [PATCH 0/2] io_uring: Add macro to validate SQE cmd size Govindarajulu Varadarajan
2026-01-29 20:13 ` [PATCH 1/2] io_uring: Add size check for sqe->cmd Govindarajulu Varadarajan
2026-01-29 20:19   ` Jens Axboe
2026-01-29 20:48   ` Caleb Sander Mateos
2026-01-30  5:11   ` Christoph Hellwig
2026-01-29 20:13 ` [PATCH 2/2] block/ublk_drv: Validate SQE128 flag before accessing the cmd Govindarajulu Varadarajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox