From b8bcbd99487e66f15e897d36bc1e0e50777364e4 Mon Sep 17 00:00:00 2001 From: Tan Xiaojun Date: Wed, 10 Apr 2019 18:34:56 +0800 Subject: [PATCH] kabi: reserve space for blk related structure hulk inclusion category: feature bugzilla: 13276 CVE: NA ------------------------------- Reserve space for the structure in blk. Signed-off-by: Tan Xiaojun Reviewed-by: Xie XiuQi Signed-off-by: Yang Yingliang --- include/linux/blk-cgroup.h | 10 ++++++++++ include/linux/blk-mq.h | 29 +++++++++++++++++++++++++++++ include/linux/blk_types.h | 5 +++++ include/linux/blkdev.h | 17 +++++++++++++++++ 4 files changed, 61 insertions(+) diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index 6d766a19f2bb..5435f97bc058 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h @@ -58,6 +58,11 @@ struct blkcg { struct list_head cgwb_list; refcount_t cgwb_refcnt; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; /* @@ -177,6 +182,11 @@ struct blkcg_policy { blkcg_pol_free_pd_fn *pd_free_fn; blkcg_pol_reset_pd_stats_fn *pd_reset_stats_fn; blkcg_pol_stat_pd_fn *pd_stat_fn; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; extern struct blkcg blkcg_root; diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 1da59c16f637..0567296ff792 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -70,6 +70,15 @@ struct blk_mq_hw_ctx { struct dentry *sched_debugfs_dir; #endif + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) + /* Must be the last member - see also blk_mq_hw_ctx_size(). */ struct srcu_struct srcu[0]; }; @@ -90,11 +99,22 @@ struct blk_mq_tag_set { struct mutex tag_list_lock; struct list_head tag_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) }; struct blk_mq_queue_data { struct request *rq; bool last; + + KABI_RESERVE(1) }; typedef blk_status_t (queue_rq_fn)(struct blk_mq_hw_ctx *, @@ -174,6 +194,15 @@ 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) + KABI_RESERVE(7) + KABI_RESERVE(8) }; enum { diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index f6dfb30737d8..c07caa2a2842 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -6,6 +6,7 @@ #ifndef __LINUX_BLK_TYPES_H #define __LINUX_BLK_TYPES_H +#include #include #include #include @@ -202,6 +203,10 @@ struct bio { struct bio_set *bi_pool; + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + /* * 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 3f7b69b32085..16cdf95cd5d5 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -392,6 +392,15 @@ struct queue_limits { unsigned char cluster; unsigned char raid_partial_stripes_expensive; enum blk_zoned_model zoned; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) }; #ifdef CONFIG_BLK_DEV_ZONED @@ -1797,6 +1806,9 @@ struct blk_integrity_profile { integrity_processing_fn *generate_fn; integrity_processing_fn *verify_fn; const char *name; + + KABI_RESERVE(1) + KABI_RESERVE(2) }; extern void blk_integrity_register(struct gendisk *, struct blk_integrity *); @@ -1989,6 +2001,11 @@ struct block_device_operations { void (*swap_slot_free_notify) (struct block_device *, unsigned long); struct module *owner; const struct pr_ops *pr_ops; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int, -- GitLab