From: Zhihao Cheng chengzhihao1@huawei.com
hulk inclusion category: feature bugzilla: 185747 https://gitee.com/openeuler/kernel/issues/I4OUFN CVE: NA
-------------------------------
Introduce kabi for storage module.
Signed-off-by: Zhihao Cheng chengzhihao1@huawei.com Reviewed-by: Jason Yan yanaijie@huawei.com Acked-by: Xie XiuQi xiexiuqi@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- block/blk-mq-tag.h | 7 +++++ drivers/nvme/host/nvme.h | 6 ++++ include/linux/backing-dev-defs.h | 11 +++++++ include/linux/bio.h | 10 +++++++ include/linux/blk-cgroup.h | 11 +++++++ include/linux/blk-mq.h | 30 +++++++++++++++++++ include/linux/blk_types.h | 10 +++++++ include/linux/blkdev.h | 16 +++++++++++ include/linux/cred.h | 12 +++++++- include/linux/dcache.h | 9 ++++++ include/linux/device.h | 9 ++++++ include/linux/device/class.h | 1 + include/linux/device/driver.h | 6 ++++ include/linux/elevator.h | 15 ++++++++++ include/linux/exportfs.h | 4 +++ include/linux/fs.h | 48 +++++++++++++++++++++++++++++++ include/linux/fsnotify_backend.h | 3 ++ include/linux/genhd.h | 14 +++++++++ include/linux/iomap.h | 6 ++++ include/linux/ioport.h | 1 + include/linux/jbd2.h | 6 ++++ include/linux/kernfs.h | 9 ++++++ include/linux/mm.h | 1 + include/linux/mount.h | 3 ++ include/linux/ns_common.h | 4 +++ include/linux/quota.h | 7 +++++ include/linux/sbitmap.h | 3 ++ include/linux/swap.h | 1 + include/linux/sysfs.h | 3 ++ include/linux/user_namespace.h | 12 ++++++++ include/linux/writeback.h | 4 +++ include/linux/xattr.h | 3 ++ include/scsi/scsi_cmnd.h | 6 ++++ include/scsi/scsi_device.h | 15 ++++++++++ include/scsi/scsi_host.h | 13 +++++++++ include/scsi/scsi_transport_fc.h | 25 ++++++++++++++++ include/target/target_core_base.h | 7 +++++ 37 files changed, 350 insertions(+), 1 deletion(-)
diff --git a/block/blk-mq-tag.h b/block/blk-mq-tag.h index f887988e5ef6..674b0d80f4d2 100644 --- a/block/blk-mq-tag.h +++ b/block/blk-mq-tag.h @@ -2,6 +2,8 @@ #ifndef INT_BLK_MQ_TAG_H #define INT_BLK_MQ_TAG_H
+#include <linux/kabi.h> + /* * Tag address space map. */ @@ -26,6 +28,11 @@ struct blk_mq_tags { * request pool */ spinlock_t lock; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
extern struct blk_mq_tags *blk_mq_init_tags(unsigned int nr_tags, diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index ad46208eac76..94cee2c566d3 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -6,6 +6,7 @@ #ifndef _NVME_H #define _NVME_H
+#include <linux/kabi.h> #include <linux/nvme.h> #include <linux/cdev.h> #include <linux/pci.h> @@ -346,6 +347,11 @@ struct nvme_ctrl { unsigned long discard_page_busy;
struct nvme_fault_inject fault_inject; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
enum nvme_iopolicy { diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h index fff9367a6348..907a8a8021c3 100644 --- a/include/linux/backing-dev-defs.h +++ b/include/linux/backing-dev-defs.h @@ -2,6 +2,7 @@ #ifndef __LINUX_BACKING_DEV_DEFS_H #define __LINUX_BACKING_DEV_DEFS_H
+#include <linux/kabi.h> #include <linux/list.h> #include <linux/radix-tree.h> #include <linux/rbtree.h> @@ -160,6 +161,11 @@ struct bdi_writeback { struct rcu_head rcu; }; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
struct backing_dev_info { @@ -198,6 +204,11 @@ struct backing_dev_info { #ifdef CONFIG_DEBUG_FS struct dentry *debug_dir; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
enum { diff --git a/include/linux/bio.h b/include/linux/bio.h index 23b7a73cd757..e895c84be0bc 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -5,6 +5,7 @@ #ifndef __LINUX_BIO_H #define __LINUX_BIO_H
+#include <linux/kabi.h> #include <linux/highmem.h> #include <linux/mempool.h> #include <linux/ioprio.h> @@ -321,6 +322,10 @@ struct bio_integrity_payload { struct work_struct bip_work; /* I/O completion */
struct bio_vec *bip_vec; + + KABI_RESERVE(1) + KABI_RESERVE(2) + struct bio_vec bip_inline_vecs[];/* embedded bvec array */ };
@@ -694,6 +699,11 @@ struct bio_set { struct bio_list rescue_list; struct work_struct rescue_work; struct workqueue_struct *rescue_workqueue; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
struct biovec_slab { diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index c8fc9792ac77..b44db9835489 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h @@ -14,6 +14,7 @@ * Nauman Rafique nauman@google.com */
+#include <linux/kabi.h> #include <linux/cgroup.h> #include <linux/percpu.h> #include <linux/percpu_counter.h> @@ -58,6 +59,11 @@ struct blkcg { #ifdef CONFIG_CGROUP_WRITEBACK struct list_head cgwb_list; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
struct blkg_iostat { @@ -169,6 +175,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 eee2c8a16601..3134aaf9032a 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -2,6 +2,7 @@ #ifndef BLK_MQ_H #define BLK_MQ_H
+#include <linux/kabi.h> #include <linux/blkdev.h> #include <linux/sbitmap.h> #include <linux/srcu.h> @@ -175,6 +176,15 @@ struct blk_mq_hw_ctx { */ 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) + /** * @srcu: Sleepable RCU. Use as lock when type of the hardware queue is * blocking (BLK_MQ_F_BLOCKING). Must be the last member - see also @@ -267,6 +277,15 @@ 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) };
/** @@ -278,6 +297,8 @@ struct blk_mq_tag_set { struct blk_mq_queue_data { struct request *rq; bool last; + + KABI_RESERVE(1) };
typedef bool (busy_iter_fn)(struct blk_mq_hw_ctx *, struct request *, void *, @@ -387,6 +408,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 f33725f03525..11b9505b14c6 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 <linux/kabi.h> #include <linux/types.h> #include <linux/bvec.h> #include <linux/ktime.h> @@ -48,6 +49,10 @@ struct block_device { /* Mutex for freeze */ struct mutex bd_fsfreeze_mutex; KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) } __randomize_layout;
/* @@ -259,6 +264,11 @@ struct bio {
struct bio_set *bi_pool;
+ KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + /* * 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 6627e3c6cb43..eae4a046037e 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -2,6 +2,7 @@ #ifndef _LINUX_BLKDEV_H #define _LINUX_BLKDEV_H
+#include <linux/kabi.h> #include <linux/sched.h> #include <linux/sched/clock.h> #include <linux/major.h> @@ -354,6 +355,8 @@ struct queue_limits { unsigned char discard_misaligned; unsigned char raid_partial_stripes_expensive; enum blk_zoned_model zoned; + + KABI_RESERVE(1) };
typedef int (*report_zones_cb)(struct blk_zone *zone, unsigned int idx, @@ -598,6 +601,11 @@ struct request_queue {
#define BLK_MAX_WRITE_HINTS 5 u64 write_hints[BLK_MAX_WRITE_HINTS]; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* Keep blk_queue_flag_name[] in sync with the definitions below */ @@ -1700,6 +1708,9 @@ struct blk_integrity_profile { integrity_prepare_fn *prepare_fn; integrity_complete_fn *complete_fn; const char *name; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
extern void blk_integrity_register(struct gendisk *, struct blk_integrity *); @@ -1893,6 +1904,11 @@ struct block_device_operations { char *(*devnode)(struct gendisk *disk, umode_t *mode); struct module *owner; const struct pr_ops *pr_ops; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#ifdef CONFIG_COMPAT diff --git a/include/linux/cred.h b/include/linux/cred.h index 280e86c4d768..cd1b5fc47d52 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -8,6 +8,7 @@ #ifndef _LINUX_CRED_H #define _LINUX_CRED_H
+#include <linux/kabi.h> #include <linux/capability.h> #include <linux/init.h> #include <linux/key.h> @@ -151,7 +152,16 @@ struct cred { int non_rcu; /* Can we skip RCU deletion? */ struct rcu_head rcu; /* RCU deletion hook */ }; - KABI_RESERVE(1) /* reserved for ucounts */ + 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) } __randomize_layout;
extern void __put_cred(struct cred *); diff --git a/include/linux/dcache.h b/include/linux/dcache.h index edb5efeff11a..4bb8b1759438 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -2,6 +2,7 @@ #ifndef __LINUX_DCACHE_H #define __LINUX_DCACHE_H
+#include <linux/kabi.h> #include <linux/atomic.h> #include <linux/list.h> #include <linux/rculist.h> @@ -121,6 +122,9 @@ struct dentry { } d_u; /* negative dentry under this dentry, if it's dir */ atomic_t d_neg_dnum; + + KABI_RESERVE(1) + KABI_RESERVE(2) } __randomize_layout;
/* @@ -150,6 +154,11 @@ struct dentry_operations { struct vfsmount *(*d_automount)(struct path *); int (*d_manage)(const struct path *, bool); struct dentry *(*d_real)(struct dentry *, const struct inode *); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) } ____cacheline_aligned;
/* diff --git a/include/linux/device.h b/include/linux/device.h index f14c248df848..2e95153942d1 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -12,6 +12,7 @@ #ifndef _DEVICE_H_ #define _DEVICE_H_
+#include <linux/kabi.h> #include <linux/dev_printk.h> #include <linux/energy_model.h> #include <linux/ioport.h> @@ -568,6 +569,14 @@ struct device { KABI_RESERVE(6) KABI_RESERVE(7) KABI_RESERVE(8) + KABI_RESERVE(9) + KABI_RESERVE(10) + KABI_RESERVE(11) + KABI_RESERVE(12) + KABI_RESERVE(13) + KABI_RESERVE(14) + KABI_RESERVE(15) + KABI_RESERVE(16) };
/** diff --git a/include/linux/device/class.h b/include/linux/device/class.h index 20d954100cc7..d152ddce543a 100644 --- a/include/linux/device/class.h +++ b/include/linux/device/class.h @@ -14,6 +14,7 @@ #ifndef _DEVICE_CLASS_H_ #define _DEVICE_CLASS_H_
+#include <linux/kabi.h> #include <linux/kobject.h> #include <linux/klist.h> #include <linux/pm.h> diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h index ee7ba5b5417e..9473256006e5 100644 --- a/include/linux/device/driver.h +++ b/include/linux/device/driver.h @@ -14,6 +14,7 @@ #ifndef _DEVICE_DRIVER_H_ #define _DEVICE_DRIVER_H_
+#include <linux/kabi.h> #include <linux/kobject.h> #include <linux/klist.h> #include <linux/pm.h> @@ -118,6 +119,11 @@ struct device_driver { void (*coredump) (struct device *dev);
struct driver_private *p; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 0bb7489e0cfb..820563e85c41 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -2,6 +2,7 @@ #ifndef _LINUX_ELEVATOR_H #define _LINUX_ELEVATOR_H
+#include <linux/kabi.h> #include <linux/percpu.h> #include <linux/hashtable.h>
@@ -50,6 +51,15 @@ struct elevator_mq_ops { struct request *(*next_request)(struct request_queue *, struct request *); void (*init_icq)(struct io_cq *); void (*exit_icq)(struct io_cq *); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
#define ELV_NAME_MAX (16) @@ -86,6 +96,11 @@ struct elevator_type /* managed by elevator core */ char icq_cache_name[ELV_NAME_MAX + 6]; /* elvname + "_io_cq" */ struct list_head list; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#define ELV_HASH_BITS 6 diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 3ceb72b67a7a..32eb1a67a7b1 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h @@ -2,6 +2,7 @@ #ifndef LINUX_EXPORTFS_H #define LINUX_EXPORTFS_H 1
+#include <linux/kabi.h> #include <linux/types.h>
struct dentry; @@ -213,6 +214,9 @@ struct export_operations { bool write, u32 *device_generation); int (*commit_blocks)(struct inode *inode, struct iomap *iomaps, int nr_iomaps, struct iattr *iattr); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
extern int exportfs_encode_inode_fh(struct inode *inode, struct fid *fid, diff --git a/include/linux/fs.h b/include/linux/fs.h index ce2cab22d942..cdba7ef87553 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2,6 +2,7 @@ #ifndef _LINUX_FS_H #define _LINUX_FS_H
+#include <linux/kabi.h> #include <linux/linkage.h> #include <linux/wait_bit.h> #include <linux/kdev_t.h> @@ -417,6 +418,11 @@ struct address_space_operations { int (*swap_activate)(struct swap_info_struct *sis, struct file *file, sector_t *span); void (*swap_deactivate)(struct file *file); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
extern const struct address_space_operations empty_aops; @@ -470,6 +476,11 @@ struct address_space { spinlock_t private_lock; struct list_head private_list; void *private_data; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) } __attribute__((aligned(sizeof(long)))) __randomize_layout; /* * On most architectures that alignment is already the case; but @@ -720,6 +731,9 @@ struct inode { #endif
void *i_private; /* fs or device private pointer */ + + KABI_RESERVE(1) + KABI_RESERVE(2) } __randomize_layout;
struct timespec64 timestamp_truncate(struct timespec64 t, struct inode *inode); @@ -1013,6 +1027,9 @@ struct file_lock; struct file_lock_operations { void (*fl_copy_lock)(struct file_lock *, struct file_lock *); void (*fl_release_private)(struct file_lock *); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct lock_manager_operations { @@ -1024,6 +1041,9 @@ struct lock_manager_operations { int (*lm_change)(struct file_lock *, int, struct list_head *); void (*lm_setup)(struct file_lock *, void **); bool (*lm_breaker_owns_lease)(struct file_lock *); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct lock_manager { @@ -1863,6 +1883,11 @@ struct file_operations { struct file *file_out, loff_t pos_out, loff_t len, unsigned int remap_flags); int (*fadvise)(struct file *, loff_t, loff_t, int); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) } __randomize_layout;
struct inode_operations { @@ -1893,6 +1918,19 @@ struct inode_operations { umode_t create_mode); int (*tmpfile) (struct inode *, struct dentry *, umode_t); int (*set_acl)(struct inode *, struct posix_acl *, int); + + 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) } ____cacheline_aligned;
static inline ssize_t call_read_iter(struct file *file, struct kiocb *kio, @@ -1968,6 +2006,11 @@ struct super_operations { struct shrink_control *); long (*free_cached_objects)(struct super_block *, struct shrink_control *); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* @@ -2255,6 +2298,11 @@ struct file_system_type { struct lock_class_key i_lock_key; struct lock_class_key i_mutex_key; struct lock_class_key i_mutex_dir_key; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#define MODULE_ALIAS_FS(NAME) MODULE_ALIAS("fs-" NAME) diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index a2e42d3cd87c..1599db3cc4de 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -10,6 +10,7 @@
#ifdef __KERNEL__
+#include <linux/kabi.h> #include <linux/idr.h> /* inotify uses this */ #include <linux/fs.h> /* struct inode */ #include <linux/list.h> @@ -158,6 +159,8 @@ struct fsnotify_ops { void (*free_event)(struct fsnotify_event *event); /* called on final put+free to free memory */ void (*free_mark)(struct fsnotify_mark *mark); + + KABI_RESERVE(1) };
/* diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 9116e41f4cc9..47ee862a7c56 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -10,6 +10,7 @@ * drew@colorado.edu */
+#include <linux/kabi.h> #include <linux/types.h> #include <linux/kdev_t.h> #include <linux/rcupdate.h> @@ -74,6 +75,11 @@ struct hd_struct { int make_it_fail; #endif struct rcu_work rcu_work; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/** @@ -163,6 +169,9 @@ struct blk_integrity { unsigned char tuple_size; unsigned char interval_exp; unsigned char tag_size; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct gendisk { @@ -210,6 +219,11 @@ struct gendisk { int node_id; struct badblocks *bb; struct lockdep_map lockdep_map; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#if IS_REACHABLE(CONFIG_CDROM) diff --git a/include/linux/iomap.h b/include/linux/iomap.h index 5bd3cac4df9c..d84fc7e55e21 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -2,6 +2,7 @@ #ifndef LINUX_IOMAP_H #define LINUX_IOMAP_H 1
+#include <linux/kabi.h> #include <linux/atomic.h> #include <linux/bitmap.h> #include <linux/blk_types.h> @@ -141,6 +142,11 @@ struct iomap_ops { */ int (*iomap_end)(struct inode *inode, loff_t pos, loff_t length, ssize_t written, unsigned flags, struct iomap *iomap); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 3930f564f207..fc7e99ba6420 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -10,6 +10,7 @@ #define _LINUX_IOPORT_H
#ifndef __ASSEMBLY__ +#include <linux/kabi.h> #include <linux/compiler.h> #include <linux/types.h> #include <linux/bits.h> diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 9afcfef64a2b..5fd415c0af98 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -19,6 +19,7 @@ #define JBD2_DEBUG #else
+#include <linux/kabi.h> #include <linux/types.h> #include <linux/buffer_head.h> #include <linux/journal-head.h> @@ -1302,6 +1303,11 @@ struct journal_s struct buffer_head *bh, enum passtype pass, int off, tid_t expected_commit_id); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#define jbd2_might_wait_for_commit(j) \ diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index 89f6a4214a70..7240d00ace86 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h @@ -6,6 +6,7 @@ #ifndef __LINUX_KERNFS_H #define __LINUX_KERNFS_H
+#include <linux/kabi.h> #include <linux/kernel.h> #include <linux/err.h> #include <linux/list.h> @@ -175,6 +176,11 @@ struct kernfs_syscall_ops { const char *new_name); int (*show_path)(struct seq_file *sf, struct kernfs_node *kn, struct kernfs_root *root); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
struct kernfs_root { @@ -268,6 +274,9 @@ struct kernfs_ops { #ifdef CONFIG_DEBUG_LOCK_ALLOC struct lock_class_key lockdep_key; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* diff --git a/include/linux/mm.h b/include/linux/mm.h index 439e550f242c..4831348f31e9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -6,6 +6,7 @@
#ifdef __KERNEL__
+#include <linux/kabi.h> #include <linux/mmdebug.h> #include <linux/gfp.h> #include <linux/bug.h> diff --git a/include/linux/mount.h b/include/linux/mount.h index aaf343b38671..87132efeaa60 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h @@ -10,6 +10,7 @@ #ifndef _LINUX_MOUNT_H #define _LINUX_MOUNT_H
+#include <linux/kabi.h> #include <linux/types.h> #include <linux/list.h> #include <linux/nodemask.h> @@ -72,6 +73,8 @@ struct vfsmount { struct dentry *mnt_root; /* root of the mounted tree */ struct super_block *mnt_sb; /* pointer to superblock */ int mnt_flags; + + KABI_RESERVE(1) } __randomize_layout;
struct file; /* forward dec */ diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h index 5fbc4000358f..631f99865c43 100644 --- a/include/linux/ns_common.h +++ b/include/linux/ns_common.h @@ -2,12 +2,16 @@ #ifndef _LINUX_NS_COMMON_H #define _LINUX_NS_COMMON_H
+#include <linux/kabi.h> + struct proc_ns_operations;
struct ns_common { atomic_long_t stashed; const struct proc_ns_operations *ops; unsigned int inum; + + KABI_RESERVE(1) };
#endif diff --git a/include/linux/quota.h b/include/linux/quota.h index 27aab84fcbaa..2b9602c8012a 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -32,6 +32,7 @@ #ifndef _LINUX_QUOTA_ #define _LINUX_QUOTA_
+#include <linux/kabi.h> #include <linux/list.h> #include <linux/mutex.h> #include <linux/rwsem.h> @@ -316,6 +317,9 @@ struct quota_format_ops { int (*commit_dqblk)(struct dquot *dquot); /* Write structure for one user */ int (*release_dqblk)(struct dquot *dquot); /* Called when last reference to dquot is being dropped */ int (*get_next_id)(struct super_block *sb, struct kqid *qid); /* Get next ID with existing structure in the quota file */ + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* Operations working with dquots */ @@ -335,6 +339,9 @@ struct dquot_operations { int (*get_inode_usage) (struct inode *, qsize_t *); /* Get next ID with active quota structure */ int (*get_next_id) (struct super_block *sb, struct kqid *qid); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct path; diff --git a/include/linux/sbitmap.h b/include/linux/sbitmap.h index e40d019c3d9d..86004ddc60bd 100644 --- a/include/linux/sbitmap.h +++ b/include/linux/sbitmap.h @@ -9,6 +9,7 @@ #ifndef __LINUX_SCALE_BITMAP_H #define __LINUX_SCALE_BITMAP_H
+#include <linux/kabi.h> #include <linux/kernel.h> #include <linux/slab.h>
@@ -65,6 +66,8 @@ struct sbitmap { * @map: Allocated bitmap. */ struct sbitmap_word *map; + + KABI_RESERVE(1) };
#define SBQ_WAIT_QUEUES 8 diff --git a/include/linux/swap.h b/include/linux/swap.h index f2aa72ec0e57..2b68047db2d9 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -2,6 +2,7 @@ #ifndef _LINUX_SWAP_H #define _LINUX_SWAP_H
+#include <linux/kabi.h> #include <linux/spinlock.h> #include <linux/linkage.h> #include <linux/mmzone.h> diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 2caa34c1ca1a..c67649e65679 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -13,6 +13,7 @@ #ifndef _SYSFS_H_ #define _SYSFS_H_
+#include <linux/kabi.h> #include <linux/kernfs.h> #include <linux/compiler.h> #include <linux/errno.h> @@ -175,6 +176,8 @@ struct bin_attribute { char *, loff_t, size_t); int (*mmap)(struct file *, struct kobject *, struct bin_attribute *attr, struct vm_area_struct *vma); + + KABI_RESERVE(1) };
/** diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index d7d02654a49e..f79abb16a874 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -2,6 +2,7 @@ #ifndef _LINUX_USER_NAMESPACE_H #define _LINUX_USER_NAMESPACE_H
+#include <linux/kabi.h> #include <linux/kref.h> #include <linux/nsproxy.h> #include <linux/ns_common.h> @@ -110,6 +111,17 @@ struct user_namespace { #endif struct ucounts *ucounts; long ucount_max[UCOUNT_COUNTS]; + + 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) } __randomize_layout;
struct ucounts { diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 9ef50176f3a1..b17b416263e0 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -12,6 +12,7 @@ #include <linux/backing-dev-defs.h> #include <linux/blk_types.h> #include <linux/blk-cgroup.h> +#include <linux/kabi.h>
struct bio;
@@ -92,6 +93,9 @@ struct writeback_control { size_t wb_lcand_bytes; /* bytes written by last candidate */ size_t wb_tcand_bytes; /* bytes written by this candidate */ #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) };
static inline int wbc_to_write_flags(struct writeback_control *wbc) diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 10b4dc2709f0..28e97277d0ab 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h @@ -12,6 +12,7 @@ #define _LINUX_XATTR_H
+#include <linux/kabi.h> #include <linux/slab.h> #include <linux/types.h> #include <linux/spinlock.h> @@ -37,6 +38,8 @@ struct xattr_handler { int (*set)(const struct xattr_handler *, struct dentry *dentry, struct inode *inode, const char *name, const void *buffer, size_t size, int flags); + + KABI_RESERVE(1) };
const char *xattr_full_name(const struct xattr_handler *, const char *); diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 69ade4fb71aa..96643e48bd52 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -2,6 +2,7 @@ #ifndef _SCSI_SCSI_CMND_H #define _SCSI_SCSI_CMND_H
+#include <linux/kabi.h> #include <linux/dma-mapping.h> #include <linux/blkdev.h> #include <linux/t10-pi.h> @@ -142,6 +143,11 @@ struct scsi_cmnd {
unsigned char tag; /* SCSI-II queued command tag */ unsigned int extra_len; /* length of alignment and padding */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 2b8c3df03f13..8b9d1aac62d1 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -2,6 +2,7 @@ #ifndef _SCSI_SCSI_DEVICE_H #define _SCSI_SCSI_DEVICE_H
+#include <linux/kabi.h> #include <linux/list.h> #include <linux/spinlock.h> #include <linux/workqueue.h> @@ -238,6 +239,14 @@ struct scsi_device { struct mutex state_mutex; enum scsi_device_state sdev_state; struct task_struct *quiesced_by; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + unsigned long sdev_data[]; } __attribute__((aligned(sizeof(unsigned long))));
@@ -322,6 +331,12 @@ struct scsi_target { char scsi_level; enum scsi_target_state state; void *hostdata; /* available to low-level driver */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + unsigned long starget_data[]; /* for the transport */ /* starget_data must be the last element!!!! */ } __attribute__((aligned(sizeof(unsigned long)))); diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 701f178b20ae..19f595b6a5ca 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -2,6 +2,7 @@ #ifndef _SCSI_SCSI_HOST_H #define _SCSI_SCSI_HOST_H
+#include <linux/kabi.h> #include <linux/device.h> #include <linux/list.h> #include <linux/types.h> @@ -486,6 +487,11 @@ struct scsi_host_template {
/* Delay for runtime autosuspend */ int rpm_autosuspend_delay; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* @@ -692,6 +698,13 @@ struct Scsi_Host { */ struct device *dma_dev;
+ KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + /* * We should ensure that this is aligned, both for better performance * and also because some compilers (m68k) don't automatically force diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 1c7dd35cb7a0..533bab18f462 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h @@ -10,6 +10,7 @@ #ifndef SCSI_TRANSPORT_FC_H #define SCSI_TRANSPORT_FC_H
+#include <linux/kabi.h> #include <linux/sched.h> #include <linux/bsg-lib.h> #include <asm/unaligned.h> @@ -351,6 +352,27 @@ struct fc_rport { /* aka fc_starget_attrs */ struct work_struct stgt_delete_work; struct work_struct rport_delete_work; struct request_queue *rqst_q; /* bsg support */ + + 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) + KABI_RESERVE(13) + KABI_RESERVE(14) + KABI_RESERVE(15) + KABI_RESERVE(16) + KABI_RESERVE(17) + KABI_RESERVE(18) + KABI_RESERVE(19) + KABI_RESERVE(20) } __attribute__((aligned(sizeof(unsigned long))));
/* bit field values for struct fc_rport "flags" field: */ @@ -437,6 +459,9 @@ struct fc_host_statistics { u64 fc_seq_not_found; /* seq is not found for exchange */ u64 fc_non_bls_resp; /* a non BLS response frame with a sequence responder in new exch */ + + KABI_RESERVE(1) + KABI_RESERVE(2) };
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 549947d407cf..bdbbf482aa97 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -2,6 +2,7 @@ #ifndef TARGET_CORE_BASE_H #define TARGET_CORE_BASE_H
+#include <linux/kabi.h> #include <linux/configfs.h> /* struct config_group */ #include <linux/dma-direction.h> /* enum dma_data_direction */ #include <linux/sbitmap.h> @@ -542,6 +543,9 @@ struct se_cmd { sense_reason_t pi_err; sector_t bad_sector; int cpuid; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct se_ua { @@ -839,6 +843,9 @@ struct se_device { /* For se_lun->lun_se_dev RCU read-side critical access */ u32 hba_index; struct rcu_head rcu_head; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct se_hba {