From 320a3efd01f88ca043805770277aaa5b4b2f699f Mon Sep 17 00:00:00 2001 From: denisecheng Date: Thu, 10 Jun 2021 15:44:54 +0800 Subject: [PATCH] kabi: reserve space for kabi Signed-off-by: denisecheng Signed-off-by: denisecheng --- drivers/pci/pci.h | 5 ++++ drivers/scsi/sd.h | 3 +++ include/linux/backing-dev-defs.h | 10 ++++++++ include/linux/bio.h | 9 +++++++ include/linux/blk-cgroup.h | 9 +++++++ include/linux/blk-mq.h | 17 +++++++++++++ include/linux/blk_types.h | 4 ++++ include/linux/blkdev.h | 11 +++++++++ include/linux/bsg-lib.h | 4 ++++ include/linux/bsg.h | 7 ++++++ include/linux/dcache.h | 11 +++++++++ include/linux/device.h | 3 +++ include/linux/dma-mapping.h | 6 +++++ include/linux/elevator.h | 9 +++++++ include/linux/ethtool.h | 6 +++++ include/linux/fs.h | 41 ++++++++++++++++++++++++++++++++ include/linux/fsnotify_backend.h | 6 +++++ include/linux/genhd.h | 14 +++++++++++ include/linux/ioport.h | 7 ++++++ include/linux/ipv6.h | 6 +++++ include/linux/irqdomain.h | 7 ++++++ include/linux/kabi.h | 12 ++++++++++ include/linux/kernfs.h | 6 +++++ include/linux/kobject.h | 9 +++++++ include/linux/mm.h | 2 ++ include/linux/mm_types.h | 11 +++++++++ include/linux/mmu_notifier.h | 6 +++++ include/linux/mmzone.h | 7 ++++++ include/linux/module.h | 6 +++++ include/linux/net.h | 5 ++++ include/linux/netdevice.h | 36 ++++++++++++++++++++++++++++ include/linux/pci.h | 15 ++++++++++++ include/linux/pci_hotplug.h | 8 +++++++ include/linux/quota.h | 15 ++++++++++++ include/linux/sched.h | 12 ++++++++++ include/linux/sched/signal.h | 5 ++++ include/linux/sched/user.h | 4 ++++ include/linux/stacktrace.h | 2 ++ include/linux/swap.h | 5 ++++ include/linux/timer.h | 4 ++++ include/linux/user_namespace.h | 7 ++++++ include/linux/workqueue.h | 5 ++++ include/linux/writeback.h | 5 ++++ include/net/bond_3ad.h | 6 +++++ include/net/bonding.h | 4 ++++ include/net/dcbnl.h | 6 +++++ include/net/dst.h | 3 +++ include/net/dst_ops.h | 6 +++++ include/net/fib_rules.h | 6 +++++ include/net/flow.h | 8 +++++++ include/net/genetlink.h | 8 +++++++ include/net/l3mdev.h | 6 +++++ include/net/lwtunnel.h | 5 ++++ include/net/neighbour.h | 5 ++++ include/net/rtnetlink.h | 5 ++++ include/net/sock.h | 11 +++++++++ include/net/switchdev.h | 6 +++++ include/net/tls.h | 4 ++++ include/net/xdp.h | 7 ++++++ include/net/xfrm.h | 5 ++++ include/scsi/scsi_cmnd.h | 6 +++++ include/scsi/scsi_device.h | 13 ++++++++++ include/scsi/scsi_host.h | 11 +++++++++ kernel/sched/sched.h | 19 +++++++++++++++ 64 files changed, 532 insertions(+) create mode 100644 include/linux/kabi.h diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index c1b8e88cc..b66ffea13 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -339,6 +339,11 @@ struct pci_sriov { u16 subsystem_device; /* VF subsystem device */ resource_size_t barsz[PCI_SRIOV_NUM_BARS]; /* VF BAR size */ bool drivers_autoprobe; /* Auto probing of VFs by driver */ + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; /** diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 1eab779f8..ae0947c36 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h @@ -116,6 +116,9 @@ struct scsi_disk { unsigned urswrz : 1; unsigned security : 1; unsigned ignore_medium_access_errors : 1; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; #define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev) diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h index 2849bdbb3..6d1368388 100644 --- a/include/linux/backing-dev-defs.h +++ b/include/linux/backing-dev-defs.h @@ -13,6 +13,7 @@ #include #include #include +#include struct page; struct device; @@ -183,6 +184,10 @@ struct bdi_writeback { struct rcu_head rcu; }; #endif + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; struct backing_dev_info { @@ -228,6 +233,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 853d92cee..ad04c3f76 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -8,6 +8,7 @@ #include #include #include +#include #ifdef CONFIG_BLOCK /* struct bio, bio_vec and BIO_* flags are defined in blk_types.h */ @@ -320,6 +321,9 @@ struct bio_integrity_payload { struct bio_vec *bip_vec; struct bio_vec bip_inline_vecs[0];/* embedded bvec array */ + + KABI_RESERVE(1); + KABI_RESERVE(2); }; #if defined(CONFIG_BLK_DEV_INTEGRITY) @@ -719,6 +723,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 bca7b04eb..3a15a99f6 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h @@ -22,6 +22,7 @@ #include #include #include +#include /* percpu_counter batch for blkg_[rw]stats, per-cpu drift doesn't matter */ #define BLKG_STAT_CPU_BATCH (INT_MAX / 2) @@ -75,6 +76,11 @@ struct blkcg { unsigned int dkstats_on; struct list_head dkstats_list; struct blkcg_dkstats *dkstats_hint; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; /* @@ -194,6 +200,9 @@ 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); }; extern struct blkcg blkcg_root; diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 0bf056de5..295c9c040 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -5,6 +5,7 @@ #include #include #include +#include struct blk_mq_tags; struct blk_flush_queue; @@ -72,6 +73,11 @@ struct blk_mq_hw_ctx { struct list_head hctx_list; + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); + /* Must be the last member - see also blk_mq_hw_ctx_size(). */ struct srcu_struct srcu[0]; }; @@ -113,11 +119,18 @@ 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); }; 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 *, @@ -221,6 +234,10 @@ 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); }; enum { diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index d688b96d1..5d1dc8841 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -9,6 +9,7 @@ #include #include #include +#include struct bio_set; struct bio; @@ -193,6 +194,9 @@ struct bio { struct bio_set *bi_pool; + KABI_RESERVE(1); + KABI_RESERVE(2); + /* * 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 5d936d4c6..db6ab77a5 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -27,6 +27,7 @@ #include #include #include +#include struct module; struct scsi_ioctl_command; @@ -348,6 +349,10 @@ struct queue_limits { unsigned char discard_misaligned; unsigned char raid_partial_stripes_expensive; enum blk_zoned_model zoned; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); }; #ifdef CONFIG_BLK_DEV_ZONED @@ -1535,6 +1540,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 *); @@ -1714,6 +1722,9 @@ struct block_device_operations { struct blk_zone *zones, unsigned int *nr_zones); struct module *owner; const struct pr_ops *pr_ops; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int, diff --git a/include/linux/bsg-lib.h b/include/linux/bsg-lib.h index 960988d42..d49a5b1f5 100644 --- a/include/linux/bsg-lib.h +++ b/include/linux/bsg-lib.h @@ -11,6 +11,7 @@ #include #include +#include struct request; struct device; @@ -60,6 +61,9 @@ struct bsg_job { struct bio *bidi_bio; void *dd_data; /* Used for driver-specific storage */ + + KABI_RESERVE(1); + KABI_RESERVE(2); }; void bsg_job_done(struct bsg_job *job, int result, diff --git a/include/linux/bsg.h b/include/linux/bsg.h index dac37b6e0..79b27efa0 100644 --- a/include/linux/bsg.h +++ b/include/linux/bsg.h @@ -3,6 +3,7 @@ #define _LINUX_BSG_H #include +#include struct request; @@ -13,6 +14,9 @@ struct bsg_ops { fmode_t mode); int (*complete_rq)(struct request *rq, struct sg_io_v4 *hdr); void (*free_rq)(struct request *rq); + + KABI_RESERVE(1); + KABI_RESERVE(2); }; struct bsg_class_device { @@ -20,6 +24,9 @@ struct bsg_class_device { int minor; struct request_queue *queue; const struct bsg_ops *ops; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; int bsg_register_queue(struct request_queue *q, struct device *parent, diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 10090f11a..613ca391f 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -13,6 +13,7 @@ #include #include #include +#include struct path; struct vfsmount; @@ -118,6 +119,11 @@ struct dentry { struct hlist_bl_node d_in_lookup_hash; /* only for in-lookup ones */ struct rcu_head d_rcu; } d_u; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } __randomize_layout; /* @@ -147,6 +153,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 297239a08..a3dc05c94 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -27,6 +27,7 @@ #include #include #include +#include struct device; struct device_private; @@ -594,6 +595,8 @@ struct class { const struct dev_pm_ops *pm; struct subsys_private *p; + + KABI_RESERVE(1); }; struct class_dev_iter { diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 4d450672b..d0d8651ee 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -11,6 +11,7 @@ #include #include #include +#include /** * List of possible attributes associated with a DMA mapping. The semantics @@ -132,6 +133,11 @@ struct dma_map_ops { u64 (*get_required_mask)(struct device *dev); size_t (*max_mapping_size)(struct device *dev); unsigned long (*get_merge_boundary)(struct device *dev); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; #define DMA_MAPPING_ERROR (~(dma_addr_t)0) diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 901bda352..2e107d1eb 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -4,6 +4,7 @@ #include #include +#include #ifdef CONFIG_BLOCK @@ -50,6 +51,9 @@ 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); }; #define ELV_NAME_MAX (16) @@ -86,6 +90,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/ethtool.h b/include/linux/ethtool.h index 95991e430..66409f92c 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -16,6 +16,7 @@ #include #include #include +#include #ifdef CONFIG_COMPAT @@ -404,6 +405,11 @@ struct ethtool_ops { struct ethtool_fecparam *); void (*get_ethtool_phy_stats)(struct net_device *, struct ethtool_stats *, u64 *); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; struct ethtool_rx_flow_rule { diff --git a/include/linux/fs.h b/include/linux/fs.h index 0aa36090a..49e12bb53 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -408,6 +409,9 @@ 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); }; extern const struct address_space_operations empty_aops; @@ -463,6 +467,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 @@ -507,6 +516,11 @@ struct block_device { int bd_fsfreeze_count; /* Mutex for freeze */ struct mutex bd_fsfreeze_mutex; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } __randomize_layout; /* XArray tags, for tagging dirty and writeback pages in the pagecache. */ @@ -736,6 +750,9 @@ struct inode { struct fsverity_info *i_verity_info; #endif + KABI_RESERVE(1); + KABI_RESERVE(2); + void *i_private; /* fs or device private pointer */ } __randomize_layout; @@ -1031,6 +1048,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 { @@ -1041,6 +1061,8 @@ struct lock_manager_operations { bool (*lm_break)(struct file_lock *); int (*lm_change)(struct file_lock *, int, struct list_head *); void (*lm_setup)(struct file_lock *, void **); + + KABI_RESERVE(1); }; struct lock_manager { @@ -1860,6 +1882,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 { @@ -1890,6 +1917,11 @@ 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); } ____cacheline_aligned; static inline ssize_t call_read_iter(struct file *file, struct kiocb *kio, @@ -1974,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); }; /* @@ -2245,6 +2282,10 @@ 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); }; #define MODULE_ALIAS_FS(NAME) MODULE_ALIAS("fs-" NAME) diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 64cfb5446..6c200a57b 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -19,6 +19,7 @@ #include #include #include +#include /* * IN_* from inotfy.h lines up EXACTLY with FS_*, this is so we can easily @@ -210,6 +211,11 @@ struct fsnotify_group { } fanotify_data; #endif /* CONFIG_FANOTIFY */ }; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; /* when calling fsnotify tell it if the data is a path or inode */ diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 452ec5120..4f369da16 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -18,6 +18,7 @@ #include #include #include +#include #ifdef CONFIG_BLOCK @@ -132,6 +133,11 @@ struct hd_struct { #endif struct percpu_ref ref; struct rcu_work rcu_work; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; #define GENHD_FL_REMOVABLE 1 @@ -176,6 +182,9 @@ struct blk_integrity { unsigned char tuple_size; unsigned char interval_exp; unsigned char tag_size; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; #endif /* CONFIG_BLK_DEV_INTEGRITY */ @@ -220,6 +229,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); }; static inline struct gendisk *part_to_disk(struct hd_struct *part) diff --git a/include/linux/ioport.h b/include/linux/ioport.h index fdc201d61..982f87a4f 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -13,6 +13,8 @@ #include #include #include +#include + /* * Resources are tree-like, allowing * nesting etc.. @@ -24,6 +26,11 @@ struct resource { unsigned long flags; unsigned long desc; struct resource *parent, *sibling, *child; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; /* diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index bbe297bbb..5b24e7d9d 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -3,6 +3,7 @@ #define _IPV6_H #include +#include #define ipv6_optlen(p) (((p)->hdrlen+1) << 3) #define ipv6_authlen(p) (((p)->hdrlen+2) << 2) @@ -75,6 +76,11 @@ struct ipv6_devconf { __s32 disable_policy; __s32 ndisc_tclass; + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); + struct ctl_table_header *sysctl_header; }; diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 824d7a19d..6fc9f0ac5 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -35,6 +35,7 @@ #include #include #include +#include struct device_node; struct irq_domain; @@ -182,6 +183,12 @@ struct irq_domain { unsigned int revmap_size; struct radix_tree_root revmap_tree; struct mutex revmap_tree_mutex; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); + unsigned int linear_revmap[]; }; diff --git a/include/linux/kabi.h b/include/linux/kabi.h new file mode 100644 index 000000000..24f31b35a --- /dev/null +++ b/include/linux/kabi.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * kabi.h + * + */ + +#ifndef _LINUX_KABI_H +#define _LINUX_KABI_H + +#define KABI_RESERVE(n) unsigned long kabi_reserved##n + +#endif /* _LINUX_KABI_H */ diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index f797ccc65..b71eb456b 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h @@ -16,6 +16,7 @@ #include #include #include +#include struct file; struct dentry; @@ -178,6 +179,9 @@ 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); }; struct kernfs_root { @@ -271,6 +275,8 @@ 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/kobject.h b/include/linux/kobject.h index e2ca0a292..f1dc39d57 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -27,6 +27,7 @@ #include #include #include +#include #define UEVENT_HELPER_PATH_LEN 256 #define UEVENT_NUM_ENVP 32 /* number of env pointers */ @@ -78,6 +79,9 @@ struct kobject { unsigned int state_add_uevent_sent:1; unsigned int state_remove_uevent_sent:1; unsigned int uevent_suppress:1; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; extern __printf(2, 3) @@ -144,6 +148,8 @@ struct kobj_type { const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj); const void *(*namespace)(struct kobject *kobj); void (*get_ownership)(struct kobject *kobj, kuid_t *uid, kgid_t *gid); + + KABI_RESERVE(1); }; struct kobj_uevent_env { @@ -195,6 +201,9 @@ struct kset { spinlock_t list_lock; struct kobject kobj; const struct kset_uevent_ops *uevent_ops; + + KABI_RESERVE(1); + KABI_RESERVE(2); } __randomize_layout; extern void kset_init(struct kset *kset); diff --git a/include/linux/mm.h b/include/linux/mm.h index 6fa5b8939..3a06b984f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -27,6 +27,7 @@ #include #include #include +#include struct mempolicy; struct anon_vma; @@ -525,6 +526,7 @@ struct vm_operations_struct { */ struct page *(*find_special_page)(struct vm_area_struct *vma, unsigned long addr); + KABI_RESERVE(1); }; static inline void vma_init(struct vm_area_struct *vma, struct mm_struct *mm) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 270aa8fd2..74f4e02aa 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -353,6 +354,11 @@ struct vm_area_struct { struct mempolicy *vm_policy; /* NUMA policy for the VMA */ #endif struct vm_userfaultfd_ctx vm_userfaultfd_ctx; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } __randomize_layout; struct core_thread { @@ -526,6 +532,11 @@ struct mm_struct { struct work_struct async_put_work; } __randomize_layout; + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); + /* * The mm_cpumask needs to be at the end of mm_struct, because it * is dynamically sized based on nr_cpu_ids. diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index 1bd8e6a09..aa4017b33 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -6,6 +6,7 @@ #include #include #include +#include struct mmu_notifier; struct mmu_notifier_ops; @@ -228,6 +229,9 @@ struct mmu_notifier_ops { */ struct mmu_notifier *(*alloc_notifier)(struct mm_struct *mm); void (*free_notifier)(struct mmu_notifier *mn); + + KABI_RESERVE(1); + KABI_RESERVE(2); }; /* @@ -247,6 +251,8 @@ struct mmu_notifier { struct mm_struct *mm; struct rcu_head rcu; unsigned int users; + + KABI_RESERVE(1); }; static inline int mm_has_notifiers(struct mm_struct *mm) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index f040f779f..9598f80ee 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -21,6 +21,7 @@ #include #include #include +#include /* Free memory management - zoned buddy allocator. */ #ifndef CONFIG_FORCE_MAX_ZONEORDER @@ -569,6 +570,9 @@ struct zone { /* Zone statistics */ atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; atomic_long_t vm_numa_stat[NR_VM_NUMA_STAT_ITEMS]; + + KABI_RESERVE(1); + KABI_RESERVE(2); } ____cacheline_internodealigned_in_smp; enum pgdat_flags { @@ -788,6 +792,9 @@ typedef struct pglist_data { /* Per-node vmstats */ struct per_cpu_nodestat __percpu *per_cpu_nodestats; atomic_long_t vm_stat[NR_VM_NODE_STAT_ITEMS]; + + KABI_RESERVE(1); + KABI_RESERVE(2); } pg_data_t; #define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages) diff --git a/include/linux/module.h b/include/linux/module.h index a2ba67f2a..a1bae4bda 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -519,6 +520,11 @@ struct module { struct error_injection_entry *ei_funcs; unsigned int num_ei_funcs; #endif + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } ____cacheline_aligned __randomize_layout; #ifndef MODULE_ARCH_INIT #define MODULE_ARCH_INIT {} diff --git a/include/linux/net.h b/include/linux/net.h index 47dd7973a..25ce0b9cf 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -203,6 +204,10 @@ struct proto_ops { int (*sendmsg_locked)(struct sock *sk, struct msghdr *msg, size_t size); int (*set_rcvlowat)(struct sock *sk, int val); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); }; #define DECLARE_SOCKADDR(type, dst, src) \ diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9de786e98..30d431600 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -48,6 +48,7 @@ #include #include #include +#include struct netpoll_info; struct device; @@ -274,6 +275,9 @@ struct header_ops { const unsigned char *haddr); bool (*validate)(const char *ll_header, unsigned int len); __be16 (*parse_protocol)(const struct sk_buff *skb); + + KABI_RESERVE(1); + KABI_RESERVE(2); }; /* These flag bits are private to the generic network queueing @@ -341,6 +345,11 @@ struct napi_struct { struct list_head dev_list; struct hlist_node napi_hash_node; unsigned int napi_id; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; enum { @@ -629,6 +638,10 @@ struct netdev_queue { #ifdef CONFIG_BQL struct dql dql; #endif + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } ____cacheline_aligned_in_smp; extern int sysctl_fb_tunnels_only_for_init_net; @@ -747,6 +760,10 @@ struct netdev_rx_queue { #ifdef CONFIG_XDP_SOCKETS struct xdp_umem *umem; #endif + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } ____cacheline_aligned_in_smp; /* @@ -917,6 +934,10 @@ struct xfrmdev_ops { bool (*xdo_dev_offload_ok) (struct sk_buff *skb, struct xfrm_state *x); void (*xdo_dev_state_advance_esn) (struct xfrm_state *x); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); }; #endif @@ -1443,6 +1464,11 @@ struct net_device_ops { int (*ndo_xsk_wakeup)(struct net_device *dev, u32 queue_id, u32 flags); struct devlink_port * (*ndo_get_devlink_port)(struct net_device *dev); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; #define DEV_MIB_MAX __DEV_MIB_MAX @@ -2086,6 +2112,11 @@ struct net_device { struct lock_class_key addr_list_lock_key; bool proto_down; unsigned wol_enabled:1; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; #define to_net_dev(d) container_of(d, struct net_device, dev) @@ -2410,6 +2441,11 @@ struct packet_type { struct sock *sk); void *af_packet_priv; struct list_head list; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; struct offload_callbacks { diff --git a/include/linux/pci.h b/include/linux/pci.h index 6a6a819c5..2665076fc 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -39,6 +39,7 @@ #include #include #include +#include #include @@ -468,6 +469,11 @@ struct pci_dev { size_t romlen; /* Length if not from BAR */ char *driver_override; /* Driver name to force a match */ + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); + unsigned long priv_flags; /* Private flags for the PCI driver */ }; @@ -602,6 +608,11 @@ struct pci_bus { struct bin_attribute *legacy_io; /* Legacy I/O for this bus */ struct bin_attribute *legacy_mem; /* Legacy mem */ unsigned int is_added:1; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; #define to_pci_bus(n) container_of(n, struct pci_bus, dev) @@ -839,6 +850,10 @@ struct pci_driver { const struct attribute_group **groups; struct device_driver driver; struct pci_dynids dynids; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); }; #define to_pci_driver(drv) container_of(drv, struct pci_driver, driver) diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index b482e42d7..4a2c53d9a 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h @@ -13,6 +13,7 @@ */ #ifndef _PCI_HOTPLUG_H #define _PCI_HOTPLUG_H +#include /** * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use @@ -45,6 +46,10 @@ struct hotplug_slot_ops { int (*get_latch_status) (struct hotplug_slot *slot, u8 *value); int (*get_adapter_status) (struct hotplug_slot *slot, u8 *value); int (*reset_slot) (struct hotplug_slot *slot, int probe); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); }; /** @@ -61,6 +66,9 @@ struct hotplug_slot { struct pci_slot *pci_slot; struct module *owner; const char *mod_name; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; static inline const char *hotplug_slot_name(const struct hotplug_slot *slot) diff --git a/include/linux/quota.h b/include/linux/quota.h index 27aab84fc..9dde23639 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h @@ -47,6 +47,7 @@ #include #include #include +#include #undef USRQUOTA #undef GRPQUOTA @@ -304,6 +305,11 @@ struct dquot { loff_t dq_off; /* Offset of dquot on disk [dq_lock, stable once set] */ unsigned long dq_flags; /* See DQ_* */ struct mem_dqblk dq_dqb; /* Diskquota usage [dq_dqb_lock] */ + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; /* Operations which must be implemented by each quota format */ @@ -316,6 +322,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 +344,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; @@ -438,6 +450,9 @@ struct quotactl_ops { int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *); int (*get_state)(struct super_block *, struct qc_state *); int (*rm_xquota)(struct super_block *, unsigned int); + + KABI_RESERVE(1); + KABI_RESERVE(2); }; struct quota_format_type { diff --git a/include/linux/sched.h b/include/linux/sched.h index fc4add9b9..29d345423 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -31,6 +31,7 @@ #include #include #include +#include /* task_struct member predeclarations (sorted alphabetically): */ struct audit_context; @@ -476,6 +477,11 @@ struct sched_entity { */ struct sched_avg avg; #endif + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; struct sched_rt_entity { @@ -563,6 +569,7 @@ struct sched_dl_entity { * time. */ struct hrtimer inactive_timer; + }; #ifdef CONFIG_UCLAMP_TASK @@ -1285,6 +1292,11 @@ struct task_struct { */ randomized_struct_fields_end + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); + /* CPU-specific state of this task: */ struct thread_struct thread; diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index baf58f4cb..23351d6ac 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -10,6 +10,7 @@ #include #include #include +#include /* * Types defining task->signal and task->sighand and APIs using them: @@ -233,6 +234,10 @@ struct signal_struct { * and may have inconsistent * permissions. */ + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } __randomize_layout; /* diff --git a/include/linux/sched/user.h b/include/linux/sched/user.h index 917d88edb..b9d485089 100644 --- a/include/linux/sched/user.h +++ b/include/linux/sched/user.h @@ -6,6 +6,7 @@ #include #include #include +#include /* * Some day this will be a full-fledged user tracking system.. @@ -39,6 +40,9 @@ struct user_struct { /* Miscellaneous per-user rate limit */ struct ratelimit_state ratelimit; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; extern int uids_sysfs_init(void); diff --git a/include/linux/stacktrace.h b/include/linux/stacktrace.h index 83bd8cb47..9c6b127a2 100644 --- a/include/linux/stacktrace.h +++ b/include/linux/stacktrace.h @@ -4,6 +4,7 @@ #include #include +#include struct task_struct; struct pt_regs; @@ -65,6 +66,7 @@ struct stack_trace { unsigned int nr_entries, max_entries; unsigned long *entries; int skip; /* input argument: How many entries to skip */ + KABI_RESERVE(1); }; extern void save_stack_trace(struct stack_trace *trace); diff --git a/include/linux/swap.h b/include/linux/swap.h index 01ad87a08..115e437c0 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -13,6 +13,7 @@ #include #include #include +#include struct notifier_block; @@ -275,6 +276,10 @@ struct swap_info_struct { */ struct work_struct discard_work; /* discard worker */ struct swap_cluster_list discard_clusters; /* discard clusters list */ + + KABI_RESERVE(1); + KABI_RESERVE(2); + struct plist_node avail_lists[0]; /* * entries in swap_avail_heads, one * entry per node. diff --git a/include/linux/timer.h b/include/linux/timer.h index 1e6650ed0..77e091c97 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -7,6 +7,7 @@ #include #include #include +#include struct timer_list { /* @@ -21,6 +22,9 @@ struct timer_list { #ifdef CONFIG_LOCKDEP struct lockdep_map lockdep_map; #endif + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); }; #ifdef CONFIG_LOCKDEP diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index fb9f4f799..b309a30a5 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -10,6 +10,7 @@ #include #include #include +#include #define UID_GID_MAP_MAX_BASE_EXTENTS 5 #define UID_GID_MAP_MAX_EXTENTS 340 @@ -85,7 +86,13 @@ struct user_namespace { struct ctl_table_header *sysctls; #endif struct ucounts *ucounts; + int ucount_max[UCOUNT_COUNTS]; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } __randomize_layout; struct ucounts { diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 4261d1c6e..ddc6f4b15 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -14,6 +14,7 @@ #include #include #include +#include struct workqueue_struct; @@ -106,6 +107,8 @@ struct work_struct { #ifdef CONFIG_LOCKDEP struct lockdep_map lockdep_map; #endif + KABI_RESERVE(1); + KABI_RESERVE(2); }; #define WORK_DATA_INIT() ATOMIC_LONG_INIT((unsigned long)WORK_STRUCT_NO_POOL) @@ -119,6 +122,8 @@ struct delayed_work { /* target workqueue and CPU ->timer uses to queue ->work */ struct workqueue_struct *wq; int cpu; + + KABI_RESERVE(1); }; struct rcu_work { diff --git a/include/linux/writeback.h b/include/linux/writeback.h index a19d845dd..bcf699d48 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -12,6 +12,7 @@ #include #include #include +#include struct bio; @@ -92,6 +93,10 @@ 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/net/bond_3ad.h b/include/net/bond_3ad.h index 9b73d4457..db6bf26bc 100644 --- a/include/net/bond_3ad.h +++ b/include/net/bond_3ad.h @@ -10,6 +10,7 @@ #include #include #include +#include /* General definitions */ #define PKT_TYPE_LACPDU cpu_to_be16(ETH_P_SLOW) @@ -243,6 +244,11 @@ typedef struct port { struct port *next_port_in_aggregator; /* Next port on the linked list of the parent aggregator */ u32 transaction_id; /* continuous number for identification of Marker PDU's; */ struct lacpdu lacpdu; /* the lacpdu that will be sent for this port */ + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } port_t; /* system structure */ diff --git a/include/net/bonding.h b/include/net/bonding.h index d42fb8924..ce29d114c 100644 --- a/include/net/bonding.h +++ b/include/net/bonding.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -147,6 +148,9 @@ struct bond_params { /* 2 bytes of padding : see ether_addr_equal_64bits() */ u8 ad_actor_system[ETH_ALEN + 2]; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; struct bond_parm_tbl { diff --git a/include/net/dcbnl.h b/include/net/dcbnl.h index e4ad58c40..2e3ae152b 100644 --- a/include/net/dcbnl.h +++ b/include/net/dcbnl.h @@ -9,6 +9,7 @@ #define __NET_DCBNL_H__ #include +#include struct dcb_app_type { int ifindex; @@ -107,6 +108,11 @@ struct dcbnl_rtnl_ops { /* buffer settings */ int (*dcbnl_getbuffer)(struct net_device *, struct dcbnl_buffer *); int (*dcbnl_setbuffer)(struct net_device *, struct dcbnl_buffer *); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; #endif /* __NET_DCBNL_H__ */ diff --git a/include/net/dst.h b/include/net/dst.h index 433f7c1ce..4d8158207 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -18,6 +18,7 @@ #include #include #include +#include struct sk_buff; @@ -77,6 +78,8 @@ struct dst_entry { #ifndef CONFIG_64BIT atomic_t __refcnt; /* 32-bit offset 64 */ #endif + KABI_RESERVE(1); + KABI_RESERVE(2); }; struct dst_metrics { diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h index 443863c7b..130559966 100644 --- a/include/net/dst_ops.h +++ b/include/net/dst_ops.h @@ -4,6 +4,7 @@ #include #include #include +#include struct dst_entry; struct kmem_cachep; @@ -40,6 +41,11 @@ struct dst_ops { struct kmem_cache *kmem_cachep; + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); + struct percpu_counter pcpuc_entries ____cacheline_aligned_in_smp; }; diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index 7fed3193f..8b0c02279 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h @@ -10,6 +10,7 @@ #include #include #include +#include struct fib_kuid_range { kuid_t start; @@ -43,6 +44,11 @@ struct fib_rule { struct fib_rule_port_range sport_range; struct fib_rule_port_range dport_range; struct rcu_head rcu; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; struct fib_lookup_arg { diff --git a/include/net/flow.h b/include/net/flow.h index d058e63fb..456d05c25 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -13,6 +13,7 @@ #include #include #include +#include /* * ifindex generation is per-net namespace, and loopback is @@ -41,6 +42,9 @@ struct flowi_common { kuid_t flowic_uid; struct flowi_tunnel flowic_tun_key; __u32 flowic_multipath_hash; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; union flowi_uli { @@ -93,6 +97,8 @@ struct flowi4 { #define fl4_ipsec_spi uli.spi #define fl4_mh_type uli.mht.type #define fl4_gre_key uli.gre_key + + KABI_RESERVE(1); } __attribute__((__aligned__(BITS_PER_LONG/8))); static inline void flowi4_init_output(struct flowi4 *fl4, int oif, @@ -154,6 +160,8 @@ struct flowi6 { #define fl6_mh_type uli.mht.type #define fl6_gre_key uli.gre_key __u32 mp_hash; + + KABI_RESERVE(1); } __attribute__((__aligned__(BITS_PER_LONG/8))); struct flowidn { diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 2d9e67a69..0e2ac2a10 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -5,6 +5,7 @@ #include #include #include +#include #define GENLMSG_DEFAULT_SIZE (NLMSG_DEFAULT_SIZE - GENL_HDRLEN) @@ -65,6 +66,9 @@ struct genl_family { unsigned int n_mcgrps; unsigned int mcgrp_offset; /* private */ struct module *module; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; struct nlattr **genl_family_attrbuf(const struct genl_family *family); @@ -140,6 +144,10 @@ struct genl_ops { u8 internal_flags; u8 flags; u8 validate; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); }; int genl_register_family(struct genl_family *family); diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h index e942372b0..2e0124708 100644 --- a/include/net/l3mdev.h +++ b/include/net/l3mdev.h @@ -9,6 +9,7 @@ #include #include +#include /** * struct l3mdev_ops - l3mdev operations @@ -33,6 +34,11 @@ struct l3mdev_ops { /* IPv6 ops */ struct dst_entry * (*l3mdev_link_scope_lookup)(const struct net_device *dev, struct flowi6 *fl6); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; #ifdef CONFIG_NET_L3_MASTER_DEV diff --git a/include/net/lwtunnel.h b/include/net/lwtunnel.h index 5d6c5b1fc..081085d94 100644 --- a/include/net/lwtunnel.h +++ b/include/net/lwtunnel.h @@ -7,6 +7,7 @@ #include #include #include +#include #define LWTUNNEL_HASH_BITS 7 #define LWTUNNEL_HASH_SIZE (1 << LWTUNNEL_HASH_BITS) @@ -30,6 +31,10 @@ struct lwtunnel_state { int (*orig_output)(struct net *net, struct sock *sk, struct sk_buff *skb); int (*orig_input)(struct sk_buff *); struct rcu_head rcu; + + KABI_RESERVE(1); + KABI_RESERVE(2); + __u8 data[0]; }; diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 2be8d6b0d..d69426a8e 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -157,6 +158,10 @@ struct neighbour { struct list_head gc_list; struct rcu_head rcu; struct net_device *dev; + + KABI_RESERVE(1); + KABI_RESERVE(2); + u8 primary_key[0]; } __randomize_layout; diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 4da61c950..b2b5856f9 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h @@ -4,6 +4,7 @@ #include #include +#include typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, struct netlink_ext_ack *); @@ -112,6 +113,10 @@ struct rtnl_link_ops { int (*fill_linkxstats)(struct sk_buff *skb, const struct net_device *dev, int *prividx, int attr); + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; int __rtnl_link_register(struct rtnl_link_ops *ops); diff --git a/include/net/sock.h b/include/net/sock.h index 4137fa178..d939fccf8 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -59,6 +59,7 @@ #include #include #include +#include #include #include @@ -511,6 +512,11 @@ struct sock { struct bpf_sk_storage __rcu *sk_bpf_storage; #endif struct rcu_head sk_rcu; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; enum sk_pacing { @@ -1188,6 +1194,11 @@ struct proto { atomic_t socks; #endif int (*diag_destroy)(struct sock *sk, int err); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } __randomize_layout; int proto_register(struct proto *prot, int alloc_slab); diff --git a/include/net/switchdev.h b/include/net/switchdev.h index aee86a189..64d1ed5ee 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -11,6 +11,7 @@ #include #include #include +#include #define SWITCHDEV_F_NO_RECURSE BIT(0) #define SWITCHDEV_F_SKIP_EOPNOTSUPP BIT(1) @@ -71,6 +72,11 @@ struct switchdev_obj { u32 flags; void *complete_priv; void (*complete)(struct net_device *dev, int err, void *priv); + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; /* SWITCHDEV_OBJ_ID_PORT_VLAN */ diff --git a/include/net/tls.h b/include/net/tls.h index 697df45c0..78c8cdf8e 100644 --- a/include/net/tls.h +++ b/include/net/tls.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -232,6 +233,9 @@ enum tls_context_flags { struct cipher_context { char *iv; char *rec_seq; + + KABI_RESERVE(1); + KABI_RESERVE(2); }; union tls_crypto_context { diff --git a/include/net/xdp.h b/include/net/xdp.h index 40c6d3398..171c21b22 100644 --- a/include/net/xdp.h +++ b/include/net/xdp.h @@ -6,6 +6,8 @@ #ifndef __LINUX_NET_XDP_H__ #define __LINUX_NET_XDP_H__ +#include + /** * DOC: XDP RX-queue information * @@ -61,6 +63,11 @@ struct xdp_rxq_info { u32 queue_index; u32 reg_state; struct xdp_mem_info mem; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); } ____cacheline_aligned; /* perf critical, avoid false-sharing */ struct xdp_buff { diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 614f19bba..552d6d225 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -123,6 +124,8 @@ struct xfrm_state_walk { u8 proto; u32 seq; struct xfrm_address_filter *filter; + + KABI_RESERVE(1); }; struct xfrm_state_offload { @@ -130,6 +133,8 @@ struct xfrm_state_offload { unsigned long offload_handle; unsigned int num_exthdrs; u8 flags; + + KABI_RESERVE(1); }; struct xfrm_mode { diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 91bd749a0..d00326f51 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -11,6 +11,7 @@ #include #include #include +#include struct Scsi_Host; struct scsi_driver; @@ -141,6 +142,11 @@ struct scsi_cmnd { unsigned long state; /* Command completion state */ unsigned char tag; /* SCSI-II queued command tag */ + + 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 202f4d6a4..81bd736c5 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -8,6 +8,7 @@ #include #include #include +#include struct device; struct request_queue; @@ -227,6 +228,12 @@ 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); + unsigned long sdev_data[0]; } __attribute__((aligned(sizeof(unsigned long)))); @@ -311,6 +318,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[0]; /* 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 31e0d6ca1..c61948674 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -10,6 +10,7 @@ #include #include #include +#include struct block_device; struct completion; @@ -486,6 +487,11 @@ struct scsi_host_template { */ unsigned int cmd_size; struct scsi_host_cmd_pool *cmd_pool; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; /* @@ -691,6 +697,11 @@ struct Scsi_Host { */ struct device *dma_dev; + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); + /* * We should ensure that this is aligned, both for better performance * and also because some compilers (m68k) don't automatically force diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 4e490e3db..fbcfc9e3a 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -401,6 +401,8 @@ struct task_group { struct uclamp_se uclamp[UCLAMP_CNT]; #endif + KABI_RESERVE(1); + KABI_RESERVE(2); }; #ifdef CONFIG_FAIR_GROUP_SCHED @@ -575,6 +577,8 @@ struct cfs_rq { struct list_head throttled_list; #endif /* CONFIG_CFS_BANDWIDTH */ #endif /* CONFIG_FAIR_GROUP_SCHED */ + KABI_RESERVE(1); + KABI_RESERVE(2); }; static inline int rt_bandwidth_enabled(void) @@ -782,6 +786,11 @@ struct root_domain { * CPUs of the rd. Protected by RCU. */ struct perf_domain __rcu *pd; + + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; extern void init_defrootdomain(void); @@ -1002,6 +1011,9 @@ struct rq { /* Must be inspected within a rcu lock section */ struct cpuidle_state *idle_state; #endif + + KABI_RESERVE(1); + KABI_RESERVE(2); }; #ifdef CONFIG_FAIR_GROUP_SCHED @@ -1412,6 +1424,9 @@ struct sched_group { struct sched_group_capacity *sgc; int asym_prefer_cpu; /* CPU of highest priority in group */ + KABI_RESERVE(1); + KABI_RESERVE(2); + /* * The CPUs this group covers. * @@ -1779,6 +1794,10 @@ struct sched_class { #ifdef CONFIG_FAIR_GROUP_SCHED void (*task_change_group)(struct task_struct *p, int type); #endif + KABI_RESERVE(1); + KABI_RESERVE(2); + KABI_RESERVE(3); + KABI_RESERVE(4); }; static inline void put_prev_task(struct rq *rq, struct task_struct *prev)