From f94e5b1a2ccb63e07bc180cd8fe321b41bae08dc Mon Sep 17 00:00:00 2001 From: Xunlei Pang Date: Thu, 18 Jul 2019 19:41:41 +0800 Subject: [PATCH] alinux: hotfix: Add Cloud Kernel hotfix enhancement We reserve some fields beforehand for core structures prone to change, so that we won't hurt when extra fields have to be added for hotfix, thereby inceasing the success rate, we even can hot add features with this enhancement. After reserving, normally cache does not matter as the reserved fields (usually at tail) are not accessed at all. Currently involve the following structures: MM: struct zone struct pglist_data struct mm_struct struct vm_area_struct struct mem_cgroup struct writeback_control Block: struct gendisk struct backing_dev_info struct bio struct queue_limits struct request_queue struct blkcg struct blkcg_policy struct blk_mq_hw_ctx struct blk_mq_tag_set struct blk_mq_queue_data struct blk_mq_ops struct elevator_mq_ops struct inode struct dentry struct address_space struct block_device struct hd_struct struct bio_set Network: struct sk_buff struct sock struct net_device_ops struct xt_target struct dst_entry struct dst_ops struct fib_rule Scheduler: struct task_struct struct cfs_rq struct rq struct sched_statistics struct sched_entity struct signal_struct struct task_group struct cpuacct cgroup: struct cgroup_root struct cgroup_subsys_state struct cgroup_subsys struct css_set Reviewed-by: Joseph Qi Signed-off-by: Xunlei Pang [ caspar: use SPDX-License-Identifier ] Signed-off-by: Caspar Zhang --- include/linux/ali_hotfix.h | 54 ++++++++++++++++++++++++++++++ include/linux/backing-dev-defs.h | 6 ++++ include/linux/bio.h | 3 ++ include/linux/blk-cgroup.h | 8 +++++ include/linux/blk-mq.h | 15 +++++++++ include/linux/blk_types.h | 5 +++ include/linux/blkdev.h | 8 +++++ include/linux/cgroup-defs.h | 12 +++++++ include/linux/dcache.h | 5 +++ include/linux/elevator.h | 3 ++ include/linux/fs.h | 9 +++++ include/linux/genhd.h | 6 ++++ include/linux/memcontrol.h | 5 +++ include/linux/mm.h | 3 ++ include/linux/mm_types.h | 10 ++++++ include/linux/mmzone.h | 8 +++++ include/linux/netdevice.h | 5 +++ include/linux/netfilter/x_tables.h | 5 +++ include/linux/sched.h | 17 ++++++++++ include/linux/sched/signal.h | 3 ++ include/linux/skbuff.h | 3 ++ include/linux/timer.h | 5 +++ include/linux/writeback.h | 3 ++ include/net/dst.h | 5 +++ include/net/dst_ops.h | 3 ++ include/net/fib_rules.h | 2 ++ include/net/sock.h | 3 ++ kernel/sched/cpuacct.c | 5 +++ kernel/sched/sched.h | 13 +++++++ 29 files changed, 232 insertions(+) create mode 100644 include/linux/ali_hotfix.h diff --git a/include/linux/ali_hotfix.h b/include/linux/ali_hotfix.h new file mode 100644 index 000000000000..fe5ce91cb749 --- /dev/null +++ b/include/linux/ali_hotfix.h @@ -0,0 +1,54 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * Copyright (c) 2019 Xunlei Pang + */ + +#ifndef _LINUX_ALI_HOTFIX_H +#define _LINUX_ALI_HOTFIX_H + +#include + +/* + * ALI_HOTFIX_RESERVE* - reserve fields for core structures prone to change + * ALI_HOTFIX_USE* - use the reserved field in your hotfix + * ALI_HOTFIX_REPLACE - replacement of _orig with a union of _orig and _new + */ + +#define _ALI_HOTFIX_REPLACE(_orig, _new) \ + union { \ + _new; \ + struct { \ + _orig; \ + } __UNIQUE_ID(ali_hotfix_hide); \ + } + +#define ALI_HOTFIX_REPLACE(_orig, _new) _ALI_HOTFIX_REPLACE(_orig, _new); + +/* + * We tried to standardize on alikernel reserved names. These wrappers leverage + * those common names making it easier to read and find in the code. + */ +#define _ALI_HOTFIX_RESERVE(n) unsigned long ali_reserved##n +#define _ALI_HOTFIX_RESERVE_P(n) void (*ali_reserved##n)(void) + +#define ALI_HOTFIX_RESERVE(n) _ALI_HOTFIX_RESERVE(n); +#define ALI_HOTFIX_RESERVE_P(n) _ALI_HOTFIX_RESERVE_P(n); + +/* + * Wrappers to replace standard alikernel reserved elements. + */ +#define ALI_HOTFIX_USE(n, _new) \ + ALI_HOTFIX_REPLACE(_ALI_HOTFIX_RESERVE(n), _new) +#define ALI_HOTFIX_USE_P(n, _new) \ + ALI_HOTFIX_REPLACE(_ALI_HOTFIX_RESERVE_P(n), _new) + +/* + * Macros for breaking up a reserved element into two smaller chunks using an + * anonymous struct inside an anonymous union. + */ +#define ALI_HOTFIX_USE2(n, _new1, _new2) \ + ALI_HOTFIX_REPLACE(_ALI_HOTFIX_RESERVE(n), struct{ _new1; _new2; }) +#define ALI_HOTFIX_USE2_P(n, _new1, _new2) \ + ALI_HOTFIX_REPLACE(_ALI_HOTFIX_RESERVE_P(n), struct{ _new1; _new2; }) + +#endif /* _LINUX_ALI_HOTFIX_H */ diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h index 07e02d6df5ad..805f15a0c5cf 100644 --- a/include/linux/backing-dev-defs.h +++ b/include/linux/backing-dev-defs.h @@ -162,6 +162,9 @@ struct bdi_writeback { struct rcu_head rcu; }; #endif + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; struct backing_dev_info { @@ -205,6 +208,9 @@ struct backing_dev_info { struct dentry *debug_dir; struct dentry *debug_stats; #endif + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; enum { diff --git a/include/linux/bio.h b/include/linux/bio.h index 8a6f4c73b25c..897e2c4c3de6 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -775,6 +775,9 @@ struct bio_set { struct bio_list rescue_list; struct work_struct rescue_work; struct workqueue_struct *rescue_workqueue; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; struct biovec_slab { diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index ad61a9985e82..f115d21464a0 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 + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) }; /* @@ -178,6 +183,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; + + ALI_HOTFIX_RESERVE_P(1) + ALI_HOTFIX_RESERVE_P(2) }; extern struct blkcg blkcg_root; diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 2885dce1ad49..75086cb24b36 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -70,6 +70,11 @@ struct blk_mq_hw_ctx { struct dentry *sched_debugfs_dir; #endif + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) + /* Must be the last member - see also blk_mq_hw_ctx_size(). */ struct srcu_struct srcu[0]; }; @@ -90,11 +95,18 @@ struct blk_mq_tag_set { struct mutex tag_list_lock; struct list_head tag_list; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) }; struct blk_mq_queue_data { struct request *rq; bool last; + + ALI_HOTFIX_RESERVE(1) }; typedef blk_status_t (queue_rq_fn)(struct blk_mq_hw_ctx *, @@ -181,6 +193,9 @@ struct blk_mq_ops { */ void (*show_rq)(struct seq_file *m, struct request *rq); #endif + + ALI_HOTFIX_RESERVE_P(1) + ALI_HOTFIX_RESERVE_P(2) }; enum { diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 4badbaae2a9c..01f8801dd47f 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h @@ -11,6 +11,8 @@ #include #include +#include + struct bio_set; struct bio; struct bio_integrity_payload; @@ -212,6 +214,9 @@ struct bio { struct bio_set *bi_pool; + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_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 ea647c91c448..41c201496cbc 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -396,6 +396,9 @@ struct queue_limits { unsigned char cluster; unsigned char raid_partial_stripes_expensive; enum blk_zoned_model zoned; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; #ifdef CONFIG_BLK_DEV_ZONED @@ -677,6 +680,11 @@ struct request_queue { #define BLK_MAX_WRITE_HINTS 5 u64 write_hints[BLK_MAX_WRITE_HINTS]; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) }; #define QUEUE_FLAG_QUEUED 0 /* uses generic tag queueing */ diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index e78086c3c160..15261d74baa4 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h @@ -161,6 +161,9 @@ struct cgroup_subsys_state { struct work_struct destroy_work; struct rcu_work destroy_rwork; + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + /* * PI: the parent css. Placed here for cache proximity to following * fields of the containing structure. @@ -262,6 +265,9 @@ struct css_set { /* For RCU-protected deletion */ struct rcu_head rcu_head; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; struct cgroup_base_stat { @@ -489,6 +495,9 @@ struct cgroup_root { /* IDs for cgroups in this hierarchy */ struct idr cgroup_idr; + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + /* The path to use for release notifications. */ char release_agent_path[PATH_MAX]; @@ -614,6 +623,9 @@ struct cgroup_subsys { void (*release)(struct task_struct *task); void (*bind)(struct cgroup_subsys_state *root_css); + ALI_HOTFIX_RESERVE_P(1) + ALI_HOTFIX_RESERVE_P(2) + bool early_init:1; /* diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 0880baefd85f..4fb637e040b0 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -14,6 +14,8 @@ #include #include +#include + struct path; struct vfsmount; @@ -117,6 +119,9 @@ struct dentry { struct hlist_bl_node d_in_lookup_hash; /* only for in-lookup ones */ struct rcu_head d_rcu; } d_u; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) } __randomize_layout; /* diff --git a/include/linux/elevator.h b/include/linux/elevator.h index a2bf4a6b9316..e1e428a80965 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -119,6 +119,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 *); + + ALI_HOTFIX_RESERVE_P(1) + ALI_HOTFIX_RESERVE_P(2) }; #define ELV_NAME_MAX (16) diff --git a/include/linux/fs.h b/include/linux/fs.h index 7e9f6b0a985a..a99b5c228530 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -431,6 +431,9 @@ struct address_space { struct list_head private_list; /* for use by the address_space */ void *private_data; /* ditto */ errseq_t wb_err; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) } __attribute__((aligned(sizeof(long)))) __randomize_layout; /* * On most architectures that alignment is already the case; but @@ -475,6 +478,9 @@ struct block_device { int bd_fsfreeze_count; /* Mutex for freeze */ struct mutex bd_fsfreeze_mutex; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) } __randomize_layout; /* @@ -694,6 +700,9 @@ struct inode { #endif void *i_private; /* fs or device private pointer */ + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) } __randomize_layout; static inline unsigned int i_blocksize(const struct inode *node) diff --git a/include/linux/genhd.h b/include/linux/genhd.h index ebc5408aca67..75ccb2848c11 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -131,6 +131,9 @@ struct hd_struct { #endif struct percpu_ref ref; struct rcu_work rcu_work; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; #define GENHD_FL_REMOVABLE 1 @@ -212,6 +215,9 @@ struct gendisk { int node_id; struct badblocks *bb; struct lockdep_map lockdep_map; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; static inline struct gendisk *part_to_disk(struct hd_struct *part) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 1ab07c049466..a1e97183bcf9 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -329,6 +329,11 @@ struct mem_cgroup { struct idle_page_stats idle_stats[KIDLED_STATS_NR_TYPE]; #endif + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) + struct mem_cgroup_per_node *nodeinfo[0]; /* WARNING: nodeinfo must be the last member here */ }; diff --git a/include/linux/mm.h b/include/linux/mm.h index 3adb081f83d5..bcdb71db6e20 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -450,6 +450,9 @@ struct vm_operations_struct { */ struct page *(*find_special_page)(struct vm_area_struct *vma, unsigned long addr); + + ALI_HOTFIX_RESERVE_P(1) + ALI_HOTFIX_RESERVE_P(2) }; 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 971d01c1c196..a2541a2ca981 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -17,6 +17,8 @@ #include +#include + #ifndef AT_VECTOR_SIZE_ARCH #define AT_VECTOR_SIZE_ARCH 0 #endif @@ -329,6 +331,11 @@ struct vm_area_struct { struct mempolicy *vm_policy; /* NUMA policy for the VMA */ #endif struct vm_userfaultfd_ctx vm_userfaultfd_ctx; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) } __randomize_layout; struct core_thread { @@ -499,6 +506,9 @@ struct mm_struct { #endif } __randomize_layout; + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + /* * 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/mmzone.h b/include/linux/mmzone.h index fe2c6b6243a8..46e9ea9fda4d 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -20,6 +20,8 @@ #include #include +#include + /* Free memory management - zoned buddy allocator. */ #ifndef CONFIG_FORCE_MAX_ZONEORDER #define MAX_ORDER 11 @@ -507,6 +509,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]; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) } ____cacheline_internodealigned_in_smp; enum pgdat_flags { @@ -724,6 +729,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]; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) } pg_data_t; #define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9dfa0ae173ac..731268b70556 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -53,6 +53,8 @@ #include #include +#include + struct netpoll_info; struct device; struct phy_device; @@ -1410,6 +1412,9 @@ struct net_device_ops { u32 flags); int (*ndo_xsk_async_xmit)(struct net_device *dev, u32 queue_id); + + ALI_HOTFIX_RESERVE_P(1) + ALI_HOTFIX_RESERVE_P(2) }; /** diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 9077b3ebea08..d03b52af9006 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h @@ -8,6 +8,8 @@ #include #include +#include + /* Test a struct->invflags and a boolean for inequality */ #define NF_INVF(ptr, flag, boolean) \ ((boolean) ^ !!((ptr)->invflags & (flag))) @@ -217,6 +219,9 @@ struct xt_target { unsigned short proto; unsigned short family; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; /* Furniture shopping... */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 6b79077123e0..fe40353fa920 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -29,6 +29,8 @@ #include #include +#include + /* task_struct member predeclarations (sorted alphabetically): */ struct audit_context; struct backing_dev_info; @@ -440,6 +442,9 @@ struct sched_statistics { u64 nr_wakeups_affine_attempts; u64 nr_wakeups_passive; u64 nr_wakeups_idle; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) #endif }; @@ -478,6 +483,9 @@ struct sched_entity { */ struct sched_avg avg; #endif + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; struct sched_rt_entity { @@ -1209,6 +1217,15 @@ struct task_struct { void *security; #endif + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) + ALI_HOTFIX_RESERVE(5) + ALI_HOTFIX_RESERVE(6) + ALI_HOTFIX_RESERVE(7) + ALI_HOTFIX_RESERVE(8) + /* * New fields for task_struct should be added above here, so that * they are included in the randomized portion of task_struct. diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 660d78c9af6c..5889abbcff98 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -232,6 +232,9 @@ struct signal_struct { struct mutex cred_guard_mutex; /* guard against foreign influences on * credential calculations * (notably. ptrace) */ + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) } __randomize_layout; /* diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 80c3da1aa8b1..8519b552ddf8 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -849,6 +849,9 @@ struct sk_buff { __u32 headers_end[0]; /* public: */ + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + /* These elements must be at the end, see alloc_skb() for details. */ sk_buff_data_t tail; sk_buff_data_t end; diff --git a/include/linux/timer.h b/include/linux/timer.h index 7b066fd38248..19d036f56c73 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -8,6 +8,8 @@ #include #include +#include + struct timer_list { /* * All fields that change during normal runtime grouped to the @@ -21,6 +23,9 @@ struct timer_list { #ifdef CONFIG_LOCKDEP struct lockdep_map lockdep_map; #endif + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; #ifdef CONFIG_LOCKDEP diff --git a/include/linux/writeback.h b/include/linux/writeback.h index fdfd04e348f6..d8d7ecbae9a5 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -80,6 +80,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 + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; static inline int wbc_to_write_flags(struct writeback_control *wbc) diff --git a/include/net/dst.h b/include/net/dst.h index ffc8ee0ea5e5..b4e4ab7bf404 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -88,6 +88,11 @@ struct dst_entry { #ifndef CONFIG_64BIT atomic_t __refcnt; /* 32-bit offset 64 */ #endif + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) }; struct dst_metrics { diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h index 5ec645f27ee3..b248cf555a36 100644 --- a/include/net/dst_ops.h +++ b/include/net/dst_ops.h @@ -39,6 +39,9 @@ struct dst_ops { struct kmem_cache *kmem_cachep; + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + struct percpu_counter pcpuc_entries ____cacheline_aligned_in_smp; }; diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index b473df5b9512..927e6546ca76 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h @@ -43,6 +43,8 @@ struct fib_rule { struct fib_rule_port_range sport_range; struct fib_rule_port_range dport_range; struct rcu_head rcu; + + ALI_HOTFIX_RESERVE(1) }; struct fib_lookup_arg { diff --git a/include/net/sock.h b/include/net/sock.h index 33661448b2b4..964919645685 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -511,6 +511,9 @@ struct sock { struct sock_reuseport __rcu *sk_reuseport_cb; __be32 sk_toa_data[16]; struct rcu_head sk_rcu; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; enum sk_pacing { diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c index 049fc29c995a..b191b6ee336e 100644 --- a/kernel/sched/cpuacct.c +++ b/kernel/sched/cpuacct.c @@ -30,6 +30,11 @@ struct cpuacct { /* cpuusage holds pointer to a u64-type object on every CPU */ struct cpuacct_usage __percpu *cpuusage; struct kernel_cpustat __percpu *cpustat; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) }; static inline struct cpuacct *css_ca(struct cgroup_subsys_state *css) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 5aeb0b954cd9..f34af8a20c27 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -392,6 +392,9 @@ struct task_group { #endif struct cfs_bandwidth cfs_bandwidth; + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) }; #ifdef CONFIG_FAIR_GROUP_SCHED @@ -565,6 +568,11 @@ struct cfs_rq { struct list_head throttled_list; #endif /* CONFIG_CFS_BANDWIDTH */ #endif /* CONFIG_FAIR_GROUP_SCHED */ + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) }; static inline int rt_bandwidth_enabled(void) @@ -915,6 +923,11 @@ struct rq { /* Must be inspected within a rcu lock section */ struct cpuidle_state *idle_state; #endif + + ALI_HOTFIX_RESERVE(1) + ALI_HOTFIX_RESERVE(2) + ALI_HOTFIX_RESERVE(3) + ALI_HOTFIX_RESERVE(4) }; static inline int cpu_of(struct rq *rq) -- GitLab