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

kabi: net: reserve space for net bpf subsystem related structure

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

--------

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

---------
Signed-off-by: NWang Hai <wanghai38@huawei.com>
Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 7d9f92e3
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <net/sock.h> #include <net/sock.h>
#include <net/tcp.h> #include <net/tcp.h>
#include <net/strparser.h> #include <net/strparser.h>
#include <linux/kabi.h>
#define MAX_MSG_FRAGS MAX_SKB_FRAGS #define MAX_MSG_FRAGS MAX_SKB_FRAGS
#define NR_MSG_FRAG_IDS (MAX_MSG_FRAGS + 1) #define NR_MSG_FRAG_IDS (MAX_MSG_FRAGS + 1)
...@@ -58,6 +59,11 @@ struct sk_psock_progs { ...@@ -58,6 +59,11 @@ struct sk_psock_progs {
struct bpf_prog *msg_parser; struct bpf_prog *msg_parser;
struct bpf_prog *skb_parser; struct bpf_prog *skb_parser;
struct bpf_prog *skb_verdict; struct bpf_prog *skb_verdict;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
enum sk_psock_state_bits { enum sk_psock_state_bits {
...@@ -107,6 +113,11 @@ struct sk_psock { ...@@ -107,6 +113,11 @@ struct sk_psock {
struct rcu_head rcu; struct rcu_head rcu;
struct work_struct gc; struct work_struct gc;
}; };
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
int sk_msg_alloc(struct sock *sk, struct sk_msg *msg, int len, int sk_msg_alloc(struct sock *sk, struct sk_msg *msg, int len,
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include <linux/memcontrol.h> #include <linux/memcontrol.h>
#include <linux/bpf-cgroup.h> #include <linux/bpf-cgroup.h>
#include <linux/siphash.h> #include <linux/siphash.h>
#include <linux/kabi.h>
extern struct inet_hashinfo tcp_hashinfo; extern struct inet_hashinfo tcp_hashinfo;
...@@ -1084,6 +1085,11 @@ struct tcp_congestion_ops { ...@@ -1084,6 +1085,11 @@ struct tcp_congestion_ops {
char name[TCP_CA_NAME_MAX]; char name[TCP_CA_NAME_MAX];
struct module *owner; struct module *owner;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
int tcp_register_congestion_control(struct tcp_congestion_ops *type); int tcp_register_congestion_control(struct tcp_congestion_ops *type);
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define __LINUX_NET_XDP_H__ #define __LINUX_NET_XDP_H__
#include <linux/skbuff.h> /* skb_shared_info */ #include <linux/skbuff.h> /* skb_shared_info */
#include <linux/kabi.h>
/** /**
* DOC: XDP RX-queue information * DOC: XDP RX-queue information
...@@ -59,6 +60,11 @@ struct xdp_rxq_info { ...@@ -59,6 +60,11 @@ struct xdp_rxq_info {
u32 queue_index; u32 queue_index;
u32 reg_state; u32 reg_state;
struct xdp_mem_info mem; struct xdp_mem_info mem;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
} ____cacheline_aligned; /* perf critical, avoid false-sharing */ } ____cacheline_aligned; /* perf critical, avoid false-sharing */
struct xdp_txq_info { struct xdp_txq_info {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册