提交 21463867 编写于 作者: W Wang Hai 提交者: Zheng Zengkai

kabi: net: reserve space for some net subsystems related structure

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4HE7P?from=project-issue
CVE: NA

--------

Reserve some fields beforehand for some net subsystems framework related structures prone
to change.

---------
Signed-off-by: NWang Hai <wanghai38@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d4e74f9f
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/sysctl.h> #include <linux/sysctl.h>
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#include <linux/refcount.h> #include <linux/refcount.h>
#include <linux/kabi.h>
struct ipv4_devconf { struct ipv4_devconf {
void *sysctl; void *sysctl;
...@@ -48,6 +49,9 @@ struct in_device { ...@@ -48,6 +49,9 @@ struct in_device {
struct neigh_parms *arp_parms; struct neigh_parms *arp_parms;
struct ipv4_devconf cnf; struct ipv4_devconf cnf;
struct rcu_head rcu_head; struct rcu_head rcu_head;
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
#define IPV4_DEVCONF(cnf, attr) ((cnf).data[IPV4_DEVCONF_ ## attr - 1]) #define IPV4_DEVCONF(cnf, attr) ((cnf).data[IPV4_DEVCONF_ ## attr - 1])
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <net/flow_offload.h> #include <net/flow_offload.h>
#include <uapi/linux/devlink.h> #include <uapi/linux/devlink.h>
#include <linux/xarray.h> #include <linux/xarray.h>
#include <linux/kabi.h>
#define DEVLINK_RELOAD_STATS_ARRAY_SIZE \ #define DEVLINK_RELOAD_STATS_ARRAY_SIZE \
(__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX) (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX)
...@@ -52,6 +53,9 @@ struct devlink { ...@@ -52,6 +53,9 @@ struct devlink {
struct mutex lock; /* Serializes access to devlink instance specific objects such as struct mutex lock; /* Serializes access to devlink instance specific objects such as
* port, sb, dpipe, resource, params, region, traps and more. * port, sb, dpipe, resource, params, region, traps and more.
*/ */
KABI_RESERVE(1)
KABI_RESERVE(2)
u8 reload_failed:1, u8 reload_failed:1,
reload_enabled:1, reload_enabled:1,
registered:1; registered:1;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/siphash.h> #include <linux/siphash.h>
#include <linux/string.h> #include <linux/string.h>
#include <uapi/linux/if_ether.h> #include <uapi/linux/if_ether.h>
#include <linux/kabi.h>
struct bpf_prog; struct bpf_prog;
struct net; struct net;
...@@ -316,6 +317,11 @@ struct flow_keys { ...@@ -316,6 +317,11 @@ struct flow_keys {
struct flow_dissector_key_icmp icmp; struct flow_dissector_key_icmp icmp;
/* 'addrs' must be the last member */ /* 'addrs' must be the last member */
struct flow_dissector_key_addrs addrs; struct flow_dissector_key_addrs addrs;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
#define FLOW_KEYS_HASH_OFFSET \ #define FLOW_KEYS_HASH_OFFSET \
......
...@@ -116,6 +116,7 @@ struct Qdisc { ...@@ -116,6 +116,7 @@ struct Qdisc {
struct rcu_head rcu; struct rcu_head rcu;
KABI_RESERVE(1) KABI_RESERVE(1)
KABI_RESERVE(2)
/* private data */ /* private data */
long privdata[] ____cacheline_aligned; long privdata[] ____cacheline_aligned;
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include <crypto/aead.h> #include <crypto/aead.h>
#include <uapi/linux/tls.h> #include <uapi/linux/tls.h>
#include <linux/kabi.h>
/* Maximum data size carried in a TLS record */ /* Maximum data size carried in a TLS record */
#define TLS_MAX_PAYLOAD_SIZE ((size_t)1 << 14) #define TLS_MAX_PAYLOAD_SIZE ((size_t)1 << 14)
...@@ -167,6 +168,10 @@ struct tls_record_info { ...@@ -167,6 +168,10 @@ struct tls_record_info {
u32 end_seq; u32 end_seq;
int len; int len;
int num_frags; int num_frags;
KABI_RESERVE(1)
KABI_RESERVE(2)
skb_frag_t frags[MAX_SKB_FRAGS]; skb_frag_t frags[MAX_SKB_FRAGS];
}; };
...@@ -284,6 +289,11 @@ struct tls_context { ...@@ -284,6 +289,11 @@ struct tls_context {
struct list_head list; struct list_head list;
refcount_t refcount; refcount_t refcount;
struct rcu_head rcu; struct rcu_head rcu;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
enum tls_offload_ctx_dir { enum tls_offload_ctx_dir {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <net/xdp.h> #include <net/xdp.h>
#include <linux/kabi.h>
struct xsk_buff_pool; struct xsk_buff_pool;
struct xdp_rxq_info; struct xdp_rxq_info;
...@@ -78,6 +79,8 @@ struct xsk_buff_pool { ...@@ -78,6 +79,8 @@ struct xsk_buff_pool {
* sockets share a single cq when the same netdev and queue id is shared. * sockets share a single cq when the same netdev and queue id is shared.
*/ */
spinlock_t cq_lock; spinlock_t cq_lock;
KABI_RESERVE(1)
KABI_RESERVE(2)
struct xdp_buff_xsk *free_heads[]; struct xdp_buff_xsk *free_heads[];
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册