hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8ZW7Z CVE: NA
--------------------------------
struture size reserves
bio_integrity_payload 136 4 bio_set 944 10 blk_integrity_profile 40 3 request dynamic 8 blk_mq_hw_ctx 704 8 blk_mq_tag_set 280 5 blk_mq_queue_data 16 2 blk_mq_ops 144 6 blk_mq_tags 240 10 rq_map_data 24 1 block_device 1616 6 bio dynamic 8 blk_integrity 16 2 gendisk 1568 12 queue_limits 120 9 blk_independent_access_range 80 6 blk_independent_access_ranges 72 7 request_queue 2088 12 blk_plug 40 3 block_device_operations 144 6 blk_holder_ops 16 6 io_comp_batch 24 1
Signed-off-by: Yu Kuai yukuai3@huawei.com --- include/linux/bio.h | 18 +++++++++ include/linux/blk-integrity.h | 4 ++ include/linux/blk-mq.h | 47 ++++++++++++++++++++++ include/linux/blk_types.h | 17 ++++++++ include/linux/blkdev.h | 75 +++++++++++++++++++++++++++++++++++ 5 files changed, 161 insertions(+)
diff --git a/include/linux/bio.h b/include/linux/bio.h index 41d417ee1349..d7510212701c 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -9,6 +9,7 @@ /* struct bio, bio_vec and BIO_* flags are defined in blk_types.h */ #include <linux/blk_types.h> #include <linux/uio.h> +#include <linux/kabi.h>
#define BIO_MAX_VECS 256U
@@ -343,6 +344,12 @@ struct bio_integrity_payload { struct work_struct bip_work; /* I/O completion */
struct bio_vec *bip_vec; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + struct bio_vec bip_inline_vecs[];/* embedded bvec array */ };
@@ -702,6 +709,17 @@ struct bio_set { * Hot un-plug notifier for the per-cpu cache, if used */ struct hlist_node cpuhp_dead; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) + KABI_RESERVE(9) + KABI_RESERVE(10) };
static inline bool bioset_initialized(struct bio_set *bs) diff --git a/include/linux/blk-integrity.h b/include/linux/blk-integrity.h index 378b2459efe2..1eec355e999b 100644 --- a/include/linux/blk-integrity.h +++ b/include/linux/blk-integrity.h @@ -33,6 +33,10 @@ struct blk_integrity_profile { integrity_prepare_fn *prepare_fn; integrity_complete_fn *complete_fn; const char *name; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) };
#ifdef CONFIG_BLK_DEV_INTEGRITY diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 9dfee0644f9c..f6de4543a653 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -189,6 +189,15 @@ struct request { */ rq_end_io_fn *end_io; void *end_io_data; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
static inline enum req_op req_op(const struct request *req) @@ -430,6 +439,15 @@ struct blk_mq_hw_ctx { * q->unused_hctx_list. */ struct list_head hctx_list; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
/** @@ -516,6 +534,12 @@ struct blk_mq_tag_set { struct mutex tag_list_lock; struct list_head tag_list; struct srcu_struct *srcu; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) };
/** @@ -527,6 +551,9 @@ struct blk_mq_tag_set { struct blk_mq_queue_data { struct request *rq; bool last; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
typedef bool (busy_tag_iter_fn)(struct request *, void *); @@ -646,6 +673,13 @@ struct blk_mq_ops { */ void (*show_rq)(struct seq_file *m, struct request *rq); #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) };
enum { @@ -751,6 +785,17 @@ struct blk_mq_tags { * request pool */ spinlock_t lock; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) + KABI_RESERVE(9) + KABI_RESERVE(10) };
static inline struct request *blk_mq_tag_to_rq(struct blk_mq_tags *tags, @@ -985,6 +1030,8 @@ struct rq_map_data { unsigned short nr_entries; bool null_mapped; bool from_user; + + KABI_RESERVE(1) };
int blk_rq_map_user(struct request_queue *, struct request *, diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index f571b45eba19..972237b32fbd 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -78,6 +78,13 @@ struct block_device { * path */ struct device bd_device; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) } __randomize_layout;
#define bdev_whole(_bdev) \ @@ -319,6 +326,16 @@ struct bio {
struct bio_set *bi_pool;
+ + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) + /* * We can inline a number of vecs at the end of the bio, to avoid * double allocations for a small number of bio_vecs. This member diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index d8a0ee46ba37..2a88b0ef3270 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -110,6 +110,9 @@ struct blk_integrity { unsigned char tuple_size; unsigned char interval_exp; unsigned char tag_size; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
typedef unsigned int __bitwise blk_mode_t; @@ -211,6 +214,19 @@ struct gendisk { * devices that do not have multiple independent access ranges. */ struct blk_independent_access_ranges *ia_ranges; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) + KABI_RESERVE(9) + KABI_RESERVE(10) + KABI_RESERVE(11) + KABI_RESERVE(12) };
static inline bool disk_live(struct gendisk *disk) @@ -328,6 +344,16 @@ struct queue_limits { * due to possible offsets. */ unsigned int dma_alignment; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) + KABI_RESERVE(9) };
typedef int (*report_zones_cb)(struct blk_zone *zone, unsigned int idx, @@ -370,12 +396,28 @@ struct blk_independent_access_range { struct kobject kobj; sector_t sector; sector_t nr_sectors; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) };
struct blk_independent_access_ranges { struct kobject kobj; bool sysfs_registered; unsigned int nr_ia_ranges; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + struct blk_independent_access_range ia_range[]; };
@@ -527,6 +569,19 @@ struct request_queue { struct mutex debugfs_mutex;
bool mq_sysfs_init_done; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) + KABI_RESERVE(9) + KABI_RESERVE(10) + KABI_RESERVE(11) + KABI_RESERVE(12) };
/* Keep blk_queue_flag_name[] in sync with the definitions below */ @@ -980,6 +1035,10 @@ struct blk_plug { bool has_elevator;
struct list_head cb_list; /* md requires an unplug callback */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) };
struct blk_plug_cb; @@ -1412,6 +1471,13 @@ struct block_device_operations { * driver. */ int (*alternative_gpt_sector)(struct gendisk *disk, sector_t *sector); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) };
#ifdef CONFIG_COMPAT @@ -1475,6 +1541,13 @@ struct blk_holder_ops { * Sync the file system mounted on the block device. */ void (*sync)(struct block_device *bdev); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) };
extern const struct blk_holder_ops fs_holder_ops; @@ -1551,6 +1624,8 @@ struct io_comp_batch { struct request *req_list; bool need_ts; void (*complete)(struct io_comp_batch *); + + KABI_RESERVE(1) };
#define DEFINE_IO_COMP_BATCH(name) struct io_comp_batch name = { }