io_uring: ensure that the io_uring_register() structs are 32-bit safe
authorJens Axboe <axboe@kernel.dk>
Sun, 13 Jan 2019 16:15:32 +0000 (09:15 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 13 Jan 2019 16:15:32 +0000 (09:15 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
os/linux/io_uring.h

index 3693d1255c9e9811b80c720a7a535317f8b9fd72..71e92026d26c2705c320b1a8e7089c6d062c90ef 100644 (file)
@@ -137,12 +137,18 @@ struct io_uring_params {
 #define IORING_UNREGISTER_FILES                3
 
 struct io_uring_register_buffers {
-       struct iovec *iovecs;
+       union {
+               struct iovec *iovecs;
+               __u64 pad;
+       };
        __u32 nr_iovecs;
 };
 
 struct io_uring_register_files {
-       __s32 *fds;
+       union {
+               __s32 *fds;
+               __u64 pad;
+       };
        __u32 nr_fds;
 };