]> Gentwo Git Trees - linux/.git/commit
io_uring/query: buffer size calculations with a union
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 6 Nov 2025 12:31:56 +0000 (12:31 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Nov 2025 14:53:33 +0000 (07:53 -0700)
commit21bd7b14a32de35bc6c4fff7a739dc5d33ce04f1
tree17f73739d3f81d077470952cb3c1504c90164933
parentb6c5f9454ef34fd2753ba7843ef4d9a295c43eee
io_uring/query: buffer size calculations with a union

Instead of having an array of a calculated size as a buffer, put all
query uapi structures into a union and pass that around. That way
everything is well typed, and the compiler will prevent opcode handling
using a structure not accounted into the buffer size.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/query.c