hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8ZMS7
----------------------------------------------------
Reserve some fields beforehand for net related structures prone to change.
Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- include/linux/netlink.h | 5 +++++ include/net/cfg802154.h | 5 +++++ include/net/inet_frag.h | 4 ++++ include/net/ip_fib.h | 8 ++++++++ include/net/ipv6_stubs.h | 4 ++++ include/net/netns/conntrack.h | 4 ++++ include/net/netns/core.h | 6 ++++++ include/net/xfrm.h | 8 ++++++++ 8 files changed, 44 insertions(+)
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 75d7de34c908..4111d53f4656 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -8,6 +8,7 @@ #include <linux/export.h> #include <net/scm.h> #include <uapi/linux/netlink.h> +#include <linux/kabi.h>
struct net;
@@ -88,6 +89,10 @@ struct netlink_ext_ack { u8 cookie[NETLINK_MAX_COOKIE_LEN]; u8 cookie_len; char _msg_buf[NETLINK_MAX_FMTMSG_LEN]; + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* Always use this macro, this allows later putting the diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h index f79ce133e51a..61aabd82b789 100644 --- a/include/net/cfg802154.h +++ b/include/net/cfg802154.h @@ -16,6 +16,8 @@
#include <net/nl802154.h>
+#include <linux/kabi.h> + struct wpan_phy; struct wpan_phy_cca; struct cfg802154_scan_request; @@ -242,6 +244,9 @@ struct wpan_phy { */ enum ieee802154_filtering_level filtering;
+ KABI_RESERVE(1) + KABI_RESERVE(2) + char priv[] __aligned(NETDEV_ALIGN); };
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 153960663ce4..7d9354c3c2ed 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -8,6 +8,7 @@ #include <linux/rbtree_types.h> #include <linux/refcount.h> #include <net/dropreason-core.h> +#include <linux/kabi.h>
/* Per netns frag queues directory */ struct fqdir { @@ -102,6 +103,9 @@ struct inet_frag_queue { u16 max_size; struct fqdir *fqdir; struct rcu_head rcu; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct inet_frags { diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 15de07d36540..7f3e0a92f857 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -22,6 +22,7 @@ #include <linux/percpu.h> #include <linux/notifier.h> #include <linux/refcount.h> +#include <linux/kabi.h>
struct fib_config { u8 fc_dst_len; @@ -100,6 +101,9 @@ struct fib_nh_common { struct rtable __rcu * __percpu *nhc_pcpu_rth_output; struct rtable __rcu *nhc_rth_input; struct fnhe_hash_bucket __rcu *nhc_exceptions; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct fib_nh { @@ -157,6 +161,10 @@ struct fib_info { bool pfsrc_removed; struct nexthop *nh; struct rcu_head rcu; + + KABI_RESERVE(1) + KABI_RESERVE(2) + struct fib_nh fib_nh[]; };
diff --git a/include/net/ipv6_stubs.h b/include/net/ipv6_stubs.h index c48186bf4737..c2f2cfbd1d03 100644 --- a/include/net/ipv6_stubs.h +++ b/include/net/ipv6_stubs.h @@ -9,6 +9,7 @@ #include <net/flow.h> #include <net/neighbour.h> #include <net/sock.h> +#include <linux/kabi.h>
/* structs from net/ip6_fib.h */ struct fib6_info; @@ -69,6 +70,9 @@ struct ipv6_stub { int (*output)(struct net *, struct sock *, struct sk_buff *)); struct net_device *(*ipv6_dev_find)(struct net *net, const struct in6_addr *addr, struct net_device *dev); + + KABI_RESERVE(1) + KABI_RESERVE(2) }; extern const struct ipv6_stub *ipv6_stub __read_mostly;
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index 1f463b3957c7..308c54643b3a 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h @@ -14,6 +14,7 @@ #include <linux/netfilter/nf_conntrack_sctp.h> #endif #include <linux/seqlock.h> +#include <linux/kabi.h>
struct ctl_table_header; struct nf_conntrack_ecache; @@ -31,6 +32,9 @@ struct nf_tcp_net { #if IS_ENABLED(CONFIG_NF_FLOW_TABLE) unsigned int offload_timeout; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) };
enum udp_conntrack { diff --git a/include/net/netns/core.h b/include/net/netns/core.h index a91ef9f8de60..dfb54998c497 100644 --- a/include/net/netns/core.h +++ b/include/net/netns/core.h @@ -3,6 +3,7 @@ #define __NETNS_CORE_H__
#include <linux/types.h> +#include <linux/kabi.h>
struct ctl_table_header; struct prot_inuse; @@ -22,6 +23,11 @@ struct netns_core { #if IS_ENABLED(CONFIG_RPS) && IS_ENABLED(CONFIG_SYSCTL) struct cpumask *rps_default_mask; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#endif diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 363c7d510554..9eff85ef369c 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -32,6 +32,8 @@ #include <net/snmp.h> #endif
+#include <linux/kabi.h> + #define XFRM_PROTO_ESP 50 #define XFRM_PROTO_AH 51 #define XFRM_PROTO_COMP 108 @@ -289,6 +291,9 @@ struct xfrm_state { /* Private data of this transformer, format is opaque, * interpreted by xfrm_type methods. */ void *data; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
static inline struct net *xs_net(struct xfrm_state *x) @@ -549,6 +554,9 @@ struct xfrm_policy { struct rcu_head rcu;
struct xfrm_dev_offload xdo; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
static inline struct net *xp_net(const struct xfrm_policy *xp)
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/4403 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/7...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/4403 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/7...