anolis: kabi: Reserve some space for kABI stability
ANBZ: #3879 Based on upstream struct size to reserve specific fields for kABI related structs. Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Reviewed-by: D. Wythe <alibuda@linux.alibaba.com> Reviewed-by: Yi Tao <escape@linux.alibaba.com> Reviewed-by: Tianchen Ding <dtcccc@linux.alibaba.com> Reviewed-by: Xunlei Pang <xlpang@linux.alibaba.com> Reviewed-by: Shuai Xue <xueshuai@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/2053
This commit is contained in:
parent
0aacbd2418
commit
9a3ac899db
|
@ -278,6 +278,8 @@ struct acpi_device_power {
|
|||
int state; /* Current state */
|
||||
struct acpi_device_power_flags flags;
|
||||
struct acpi_device_power_state states[ACPI_D_STATE_COUNT]; /* Power states (D0-D3Cold) */
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
};
|
||||
|
||||
/* Performance Management */
|
||||
|
|
|
@ -76,6 +76,10 @@ struct blkg_iostat_set {
|
|||
struct u64_stats_sync sync;
|
||||
struct blkg_iostat cur;
|
||||
struct blkg_iostat last;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -585,6 +585,9 @@ struct btf_func_model {
|
|||
u8 ret_size;
|
||||
u8 nr_args;
|
||||
u8 arg_size[MAX_BPF_FUNC_ARGS];
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
};
|
||||
|
||||
/* Restore arguments before returning from trampoline to let original function
|
||||
|
@ -653,6 +656,8 @@ struct bpf_ksym {
|
|||
struct list_head lnode;
|
||||
struct latch_tree_node tnode;
|
||||
bool prog;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
};
|
||||
|
||||
enum bpf_tramp_prog_type {
|
||||
|
@ -673,6 +678,8 @@ struct bpf_tramp_image {
|
|||
struct rcu_head rcu;
|
||||
struct work_struct work;
|
||||
};
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
};
|
||||
|
||||
struct bpf_trampoline {
|
||||
|
@ -975,6 +982,8 @@ struct bpf_link_ops {
|
|||
void (*show_fdinfo)(const struct bpf_link *link, struct seq_file *seq);
|
||||
int (*fill_link_info)(const struct bpf_link *link,
|
||||
struct bpf_link_info *info);
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
};
|
||||
|
||||
struct bpf_link_primer {
|
||||
|
@ -1400,6 +1409,10 @@ int bpf_obj_get_user(const char __user *pathname, int flags);
|
|||
|
||||
struct bpf_iter_aux_info {
|
||||
struct bpf_map *map;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
};
|
||||
|
||||
typedef int (*bpf_iter_attach_target_t)(struct bpf_prog *prog,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef _BPF_LOCAL_STORAGE_H
|
||||
#define _BPF_LOCAL_STORAGE_H
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <linux/rculist.h>
|
||||
#include <linux/list.h>
|
||||
|
@ -85,6 +86,8 @@ struct bpf_local_storage {
|
|||
*/
|
||||
struct rcu_head rcu;
|
||||
raw_spinlock_t lock; /* Protect adding/removing from the "list" */
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
};
|
||||
|
||||
/* U16_MAX is much more than enough for sk local storage
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/refcount.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/ck_kabi.h>
|
||||
|
||||
/*
|
||||
* Autoloaded crypto modules should only use a prefixed name to avoid allowing
|
||||
|
@ -636,6 +637,8 @@ struct crypto_tfm {
|
|||
|
||||
struct crypto_alg *__crt_alg;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
|
||||
void *__crt_ctx[] CRYPTO_MINALIGN_ATTR;
|
||||
};
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#ifndef __LINUX_DMA_FENCE_H
|
||||
#define __LINUX_DMA_FENCE_H
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/list.h>
|
||||
|
@ -261,6 +262,8 @@ struct dma_fence_ops {
|
|||
*/
|
||||
void (*timeline_value_str)(struct dma_fence *fence,
|
||||
char *str, int size);
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
};
|
||||
|
||||
void dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops,
|
||||
|
|
|
@ -259,6 +259,8 @@ bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
|
|||
struct ethtool_pause_stats {
|
||||
u64 tx_pause_frames;
|
||||
u64 rx_pause_frames;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -774,6 +774,19 @@ struct perf_event {
|
|||
#endif
|
||||
struct list_head sb_list;
|
||||
#endif /* CONFIG_PERF_EVENTS */
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
CK_KABI_RESERVE(5)
|
||||
CK_KABI_RESERVE(6)
|
||||
CK_KABI_RESERVE(7)
|
||||
CK_KABI_RESERVE(8)
|
||||
CK_KABI_RESERVE(9)
|
||||
CK_KABI_RESERVE(10)
|
||||
CK_KABI_RESERVE(11)
|
||||
CK_KABI_RESERVE(12)
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#ifndef _linux_POSIX_TIMERS_H
|
||||
#define _linux_POSIX_TIMERS_H
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/alarmtimer.h>
|
||||
|
@ -134,6 +135,11 @@ struct posix_cputimers {
|
|||
struct posix_cputimers_work {
|
||||
struct callback_head work;
|
||||
unsigned int scheduled;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
};
|
||||
|
||||
static inline void posix_cputimers_init(struct posix_cputimers *pct)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef _LINUX_PSI_TYPES_H
|
||||
#define _LINUX_PSI_TYPES_H
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/seqlock.h>
|
||||
#include <linux/types.h>
|
||||
|
@ -168,6 +169,9 @@ struct psi_group {
|
|||
u64 polling_total[NR_PSI_STATES - 1];
|
||||
u64 polling_next_update;
|
||||
u64 polling_until;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
};
|
||||
|
||||
#else /* CONFIG_PSI */
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#define _LINUX_STAT_H
|
||||
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <asm/stat.h>
|
||||
#include <uapi/linux/stat.h>
|
||||
|
||||
|
@ -46,6 +47,9 @@ struct kstat {
|
|||
struct timespec64 btime; /* File creation time */
|
||||
u64 blocks;
|
||||
u64 mnt_id;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/static_key.h>
|
||||
#include <linux/ck_kabi.h>
|
||||
|
||||
struct static_call_key;
|
||||
|
||||
|
@ -38,6 +39,8 @@ struct tracepoint {
|
|||
int (*regfunc)(void);
|
||||
void (*unregfunc)(void);
|
||||
struct tracepoint_func __rcu *funcs;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
};
|
||||
|
||||
#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS
|
||||
|
|
|
@ -1448,6 +1448,15 @@ struct devlink_ops {
|
|||
struct devlink_port *port,
|
||||
enum devlink_port_fn_state state,
|
||||
struct netlink_ext_ack *extack);
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
CK_KABI_RESERVE(5)
|
||||
CK_KABI_RESERVE(6)
|
||||
CK_KABI_RESERVE(7)
|
||||
CK_KABI_RESERVE(8)
|
||||
};
|
||||
|
||||
static inline void *devlink_priv(struct devlink *devlink)
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
*/
|
||||
struct genl_multicast_group {
|
||||
char name[GENL_NAMSIZ];
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
};
|
||||
|
||||
struct genl_ops;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#ifndef _NET_IF_INET6_H
|
||||
#define _NET_IF_INET6_H
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
#include <net/snmp.h>
|
||||
#include <linux/ipv6.h>
|
||||
#include <linux/refcount.h>
|
||||
|
@ -212,6 +213,23 @@ struct inet6_dev {
|
|||
|
||||
unsigned long tstamp; /* ipv6InterfaceTable update timestamp */
|
||||
struct rcu_head rcu;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
CK_KABI_RESERVE(3)
|
||||
CK_KABI_RESERVE(4)
|
||||
CK_KABI_RESERVE(5)
|
||||
CK_KABI_RESERVE(6)
|
||||
CK_KABI_RESERVE(7)
|
||||
CK_KABI_RESERVE(8)
|
||||
CK_KABI_RESERVE(9)
|
||||
CK_KABI_RESERVE(10)
|
||||
CK_KABI_RESERVE(11)
|
||||
CK_KABI_RESERVE(12)
|
||||
CK_KABI_RESERVE(13)
|
||||
CK_KABI_RESERVE(14)
|
||||
CK_KABI_RESERVE(15)
|
||||
CK_KABI_RESERVE(16)
|
||||
};
|
||||
|
||||
static inline void ipv6_eth_mc_map(const struct in6_addr *addr, char *buf)
|
||||
|
|
|
@ -5,10 +5,15 @@
|
|||
#ifndef __NETNS_UNIX_H__
|
||||
#define __NETNS_UNIX_H__
|
||||
|
||||
#include <linux/ck_kabi.h>
|
||||
|
||||
struct ctl_table_header;
|
||||
struct netns_unix {
|
||||
int sysctl_max_dgram_qlen;
|
||||
struct ctl_table_header *ctl;
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
CK_KABI_RESERVE(2)
|
||||
};
|
||||
|
||||
#endif /* __NETNS_UNIX_H__ */
|
||||
|
|
|
@ -388,6 +388,8 @@ struct tcf_proto_ops {
|
|||
struct net *net,
|
||||
void *tmplt_priv);
|
||||
|
||||
CK_KABI_RESERVE(1)
|
||||
|
||||
struct module *owner;
|
||||
int flags;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue