summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2026-03-23 15:44:04 +0300
committerJens Axboe <axboe@kernel.dk>2026-04-01 19:21:13 +0300
commitde6ed1b323fc50eaa3d7847274cff51055b5c498 (patch)
tree9f97e3a9da72cd11ea706426093c2a88df28ed4a
parent5c727ce042988df45232cfdb6599bb46116fd69c (diff)
downloadlinux-de6ed1b323fc50eaa3d7847274cff51055b5c498.tar.xz
io_uring/zcrx: check ctrl op payload struct sizes
Add a build check that ctrl payloads are of the same size and don't grow struct zcrx_ctrl. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://patch.msgid.link/af66caf9776d18e9ff880ab828eb159a6a03caf5.1774261953.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--io_uring/zcrx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 32829775fb6b..e2e0df78dae1 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -1253,6 +1253,8 @@ int io_zcrx_ctrl(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_args)
struct zcrx_ctrl ctrl;
struct io_zcrx_ifq *zcrx;
+ BUILD_BUG_ON(sizeof(ctrl.zc_export) != sizeof(ctrl.zc_flush));
+
if (nr_args)
return -EINVAL;
if (copy_from_user(&ctrl, arg, sizeof(ctrl)))