diff options
author | Keith Busch <kbusch@kernel.org> | 2022-08-13 00:56:33 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-08-13 01:00:35 +0200 |
commit | addebd9ac9ca0ef8b3764907bf8018e48caffc64 (patch) | |
tree | ca5654373356d0d8446140f6d4350348d2a9625c | |
parent | io_uring: consistently make use of io_notif_to_data() (diff) | |
download | linux-addebd9ac9ca0ef8b3764907bf8018e48caffc64.tar.xz linux-addebd9ac9ca0ef8b3764907bf8018e48caffc64.zip |
fs: don't randomize struct kiocb fields
This is a size sensitive structure and randomizing can introduce extra
padding that breaks io_uring's fixed size expectations. There are few
fields here as it is, half of which need a fixed order to optimally
pack, so the randomization isn't providing much.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/io-uring/b6f508ca-b1b2-5f40-7998-e4cff1cf7212@kernel.dk/
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | include/linux/fs.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9f131e559d05..daf69a6504b6 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -339,17 +339,12 @@ enum rw_hint { struct kiocb { struct file *ki_filp; - - /* The 'ki_filp' pointer is shared in a union for aio */ - randomized_struct_fields_start - loff_t ki_pos; void (*ki_complete)(struct kiocb *iocb, long ret); void *private; int ki_flags; u16 ki_ioprio; /* See linux/ioprio.h */ struct wait_page_queue *ki_waitq; /* for async buffered IO */ - randomized_struct_fields_end }; static inline bool is_sync_kiocb(struct kiocb *kiocb) |