Reserve space for net, inheriting the kabi reservation in kernel 5.10.
Wang Hai (6): kabi: net: reserve space for net base subsystem related structure kabi: net: reserve space for net bpf subsystem related structure kabi: net: reserve space for net can subsystem related structure kabi: net: reserve space for net netfilter subsystem related structure kabi: net: reserve space for net rdma subsystem related structure kabi: net: reserve space for net sunrpc subsystem related structure
include/linux/can/core.h | 4 +++ include/linux/can/dev.h | 6 ++++ include/linux/can/rx-offload.h | 4 +++ include/linux/device.h | 10 ++++++ include/linux/device/class.h | 6 ++++ include/linux/ethtool.h | 6 ++++ include/linux/inetdevice.h | 4 +++ include/linux/ipv6.h | 6 ++++ include/linux/net.h | 6 ++++ include/linux/netdevice.h | 42 ++++++++++++++++++++++++++ include/linux/netfilter.h | 13 ++++++++ include/linux/netfilter/ipset/ip_set.h | 10 ++++++ include/linux/netfilter/nfnetlink.h | 7 +++++ include/linux/netfilter_ipv6.h | 4 +++ include/linux/skbuff.h | 6 ++++ include/linux/skmsg.h | 11 +++++++ include/linux/sunrpc/cache.h | 4 +++ include/linux/sunrpc/clnt.h | 12 ++++++++ include/linux/sunrpc/sched.h | 15 +++++++++ include/linux/sunrpc/stats.h | 7 +++++ include/linux/sunrpc/xprt.h | 17 +++++++++++ include/net/dcbnl.h | 10 ++++++ include/net/dst.h | 10 ++++++ include/net/dst_ops.h | 10 ++++++ include/net/fib_rules.h | 10 ++++++ include/net/flow.h | 7 +++++ include/net/flow_dissector.h | 6 ++++ include/net/genetlink.h | 12 ++++++++ include/net/inet_connection_sock.h | 7 +++++ include/net/ip6_fib.h | 13 ++++++++ include/net/l3mdev.h | 6 ++++ include/net/lwtunnel.h | 7 +++++ include/net/neighbour.h | 11 +++++++ include/net/netdev_rx_queue.h | 5 +++ include/net/netfilter/nf_conntrack.h | 4 +++ include/net/netlink.h | 5 +++ include/net/netns/can.h | 4 +++ include/net/netns/ipv4.h | 8 +++++ include/net/netns/ipv6.h | 4 +++ include/net/netns/netfilter.h | 4 +++ include/net/netns/nftables.h | 4 +++ include/net/netns/xfrm.h | 4 +++ include/net/page_pool/types.h | 4 +++ include/net/rtnetlink.h | 10 ++++++ include/net/sch_generic.h | 11 +++++++ include/net/sock.h | 18 +++++++++++ include/net/switchdev.h | 6 ++++ include/net/tcp.h | 6 ++++ include/net/tls.h | 15 +++++++++ include/net/xdp.h | 6 ++++ include/net/xsk_buff_pool.h | 3 ++ include/rdma/ib_addr.h | 4 +++ include/rdma/rdma_cm.h | 10 ++++++ include/rdma/rdma_counter.h | 4 +++ include/rdma/rdma_netlink.h | 4 +++ include/rdma/rdma_vt.h | 7 +++++ include/rdma/rdmavt_qp.h | 5 +++ net/devlink/devl_internal.h | 5 +++ 58 files changed, 469 insertions(+)
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/4050 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/J...
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/4050 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/J...
From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC
----------------------------------------------------
Reserve some fields beforehand for net base framework related structures prone to change.
Signed-off-by: Wang Hai wanghai38@huawei.com Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- include/linux/device.h | 10 +++++++ include/linux/device/class.h | 6 +++++ include/linux/ethtool.h | 6 +++++ include/linux/inetdevice.h | 4 +++ include/linux/ipv6.h | 6 +++++ include/linux/net.h | 6 +++++ include/linux/netdevice.h | 42 ++++++++++++++++++++++++++++++ include/linux/skbuff.h | 6 +++++ include/net/dcbnl.h | 10 +++++++ include/net/dst.h | 10 +++++++ include/net/dst_ops.h | 10 +++++++ include/net/fib_rules.h | 10 +++++++ include/net/flow.h | 7 +++++ include/net/flow_dissector.h | 6 +++++ include/net/genetlink.h | 12 +++++++++ include/net/inet_connection_sock.h | 7 +++++ include/net/ip6_fib.h | 13 +++++++++ include/net/l3mdev.h | 6 +++++ include/net/lwtunnel.h | 7 +++++ include/net/neighbour.h | 11 ++++++++ include/net/netdev_rx_queue.h | 5 ++++ include/net/netlink.h | 5 ++++ include/net/netns/ipv4.h | 8 ++++++ include/net/netns/ipv6.h | 4 +++ include/net/netns/nftables.h | 4 +++ include/net/netns/xfrm.h | 4 +++ include/net/page_pool/types.h | 4 +++ include/net/rtnetlink.h | 10 +++++++ include/net/sch_generic.h | 11 ++++++++ include/net/sock.h | 18 +++++++++++++ include/net/switchdev.h | 6 +++++ include/net/tls.h | 15 +++++++++++ include/net/xsk_buff_pool.h | 3 +++ net/devlink/devl_internal.h | 5 ++++ 34 files changed, 297 insertions(+)
diff --git a/include/linux/device.h b/include/linux/device.h index 56d93a1ffb7b..03616355449f 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -31,6 +31,7 @@ #include <linux/device/class.h> #include <linux/device/driver.h> #include <linux/cleanup.h> +#include <linux/kabi.h> #include <asm/device.h>
struct device; @@ -805,6 +806,15 @@ struct device { #ifdef CONFIG_DMA_OPS_BYPASS bool dma_ops_bypass : 1; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
/** diff --git a/include/linux/device/class.h b/include/linux/device/class.h index abf3d3bfb6fe..097cc376a68c 100644 --- a/include/linux/device/class.h +++ b/include/linux/device/class.h @@ -18,6 +18,7 @@ #include <linux/klist.h> #include <linux/pm.h> #include <linux/device/bus.h> +#include <linux/kabi.h>
struct device; struct fwnode_handle; @@ -69,6 +70,11 @@ struct class { void (*get_ownership)(const struct device *dev, kuid_t *uid, kgid_t *gid);
const struct dev_pm_ops *pm; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
struct class_dev_iter { diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 1b523fd48586..f9ee0a8c440b 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -18,6 +18,7 @@ #include <linux/if_ether.h> #include <linux/netlink.h> #include <uapi/linux/ethtool.h> +#include <linux/kabi.h>
struct compat_ethtool_rx_flow_spec { u32 flow_type; @@ -912,6 +913,11 @@ struct ethtool_ops { int (*set_mm)(struct net_device *dev, struct ethtool_mm_cfg *cfg, struct netlink_ext_ack *extack); void (*get_mm_stats)(struct net_device *dev, struct ethtool_mm_stats *stats); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
int ethtool_check_ops(const struct ethtool_ops *ops); diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ddb27fc0ee8c..518199314e1d 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h @@ -13,6 +13,7 @@ #include <linux/sysctl.h> #include <linux/rtnetlink.h> #include <linux/refcount.h> +#include <linux/kabi.h>
struct ipv4_devconf { void *sysctl; @@ -50,6 +51,9 @@ struct in_device { struct neigh_parms *arp_parms; struct ipv4_devconf cnf; struct rcu_head rcu_head; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
#define IPV4_DEVCONF(cnf, attr) ((cnf).data[IPV4_DEVCONF_ ## attr - 1]) diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index af8a771a053c..43772eaa0856 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -3,6 +3,7 @@ #define _IPV6_H
#include <uapi/linux/ipv6.h> +#include <linux/kabi.h>
#define ipv6_optlen(p) (((p)->hdrlen+1) << 3) #define ipv6_authlen(p) (((p)->hdrlen+2) << 2) @@ -84,6 +85,11 @@ struct ipv6_devconf { __u8 ndisc_evict_nocarrier;
struct ctl_table_header *sysctl_header; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
struct ipv6_params { diff --git a/include/linux/net.h b/include/linux/net.h index c9b4a63791a4..5c1af86aa121 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -25,6 +25,7 @@ #include <linux/sockptr.h>
#include <uapi/linux/net.h> +#include <linux/kabi.h>
struct poll_table_struct; struct pipe_inode_info; @@ -223,6 +224,11 @@ struct proto_ops { int (*sendmsg_locked)(struct sock *sk, struct msghdr *msg, size_t size); int (*set_rcvlowat)(struct sock *sk, int val); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#define DECLARE_SOCKADDR(type, dst, src) \ diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index b8e60a20416b..fc25776eaaff 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -52,6 +52,7 @@ #include <net/net_trackers.h> #include <net/net_debug.h> #include <net/dropreason-core.h> +#include <linux/kabi.h>
struct netpoll_info; struct device; @@ -319,6 +320,9 @@ struct header_ops { const unsigned char *haddr); bool (*validate)(const char *ll_header, unsigned int len); __be16 (*parse_protocol)(const struct sk_buff *skb); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* These flag bits are private to the generic network queueing @@ -380,6 +384,11 @@ struct napi_struct { /* control-path-only fields follow */ struct list_head dev_list; struct hlist_node napi_hash_node; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
enum { @@ -658,6 +667,11 @@ struct netdev_queue { #ifdef CONFIG_BQL struct dql dql; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) } ____cacheline_aligned_in_smp;
extern int sysctl_fb_tunnels_only_for_init_net; @@ -1038,6 +1052,11 @@ struct xfrmdev_ops { int (*xdo_dev_policy_add) (struct xfrm_policy *x, struct netlink_ext_ack *extack); void (*xdo_dev_policy_delete) (struct xfrm_policy *x); void (*xdo_dev_policy_free) (struct xfrm_policy *x); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; #endif
@@ -1645,6 +1664,15 @@ struct net_device_ops { int (*ndo_hwtstamp_set)(struct net_device *dev, struct kernel_hwtstamp_config *kernel_config, struct netlink_ext_ack *extack); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
/** @@ -2417,6 +2445,15 @@ struct net_device { struct rtnl_hw_stats64 *offload_xstats_l3;
struct devlink_port *devlink_port; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) }; #define to_net_dev(d) container_of(d, struct net_device, dev)
@@ -2711,6 +2748,11 @@ struct packet_type { struct net *af_packet_net; void *af_packet_priv; struct list_head list; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
struct offload_callbacks { diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index e4524542a18f..58c227b47d81 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -32,6 +32,7 @@ #include <linux/if_packet.h> #include <linux/llist.h> #include <net/flow.h> +#include <linux/kabi.h> #if IS_ENABLED(CONFIG_NF_CONNTRACK) #include <linux/netfilter/nf_conntrack_common.h> #endif @@ -1053,6 +1054,11 @@ struct sk_buff { #endif ); /* end headers group */
+ KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + /* 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/net/dcbnl.h b/include/net/dcbnl.h index 42207fc44660..f6ae2dd0d493 100644 --- a/include/net/dcbnl.h +++ b/include/net/dcbnl.h @@ -9,6 +9,7 @@ #define __NET_DCBNL_H__
#include <linux/dcbnl.h> +#include <linux/kabi.h>
struct net_device;
@@ -131,6 +132,15 @@ struct dcbnl_rtnl_ops { /* rewrite */ int (*dcbnl_setrewr)(struct net_device *dev, struct dcb_app *app); int (*dcbnl_delrewr)(struct net_device *dev, struct dcb_app *app); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
#endif /* __NET_DCBNL_H__ */ diff --git a/include/net/dst.h b/include/net/dst.h index 78884429deed..cff571194311 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -20,6 +20,7 @@ #include <net/neighbour.h> #include <asm/processor.h> #include <linux/indirect_call_wrapper.h> +#include <linux/kabi.h>
struct sk_buff;
@@ -92,6 +93,15 @@ struct dst_entry { #ifdef CONFIG_64BIT struct lwtunnel_state *lwtstate; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
struct dst_metrics { diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h index 6d1c8541183d..a3a4d6ccb459 100644 --- a/include/net/dst_ops.h +++ b/include/net/dst_ops.h @@ -4,6 +4,7 @@ #include <linux/types.h> #include <linux/percpu_counter.h> #include <linux/cache.h> +#include <linux/kabi.h>
struct dst_entry; struct kmem_cachep; @@ -41,6 +42,15 @@ struct dst_ops { struct kmem_cache *kmem_cachep;
struct percpu_counter pcpuc_entries ____cacheline_aligned_in_smp; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
static inline int dst_entries_get_fast(struct dst_ops *dst) diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h index 82da359bca03..363773e07f96 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h @@ -11,6 +11,7 @@ #include <net/rtnetlink.h> #include <net/fib_notifier.h> #include <linux/indirect_call_wrapper.h> +#include <linux/kabi.h>
struct fib_kuid_range { kuid_t start; @@ -44,6 +45,15 @@ struct fib_rule { struct fib_rule_port_range sport_range; struct fib_rule_port_range dport_range; struct rcu_head rcu; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
struct fib_lookup_arg { diff --git a/include/net/flow.h b/include/net/flow.h index 335bbc52171c..0cc5f2ef1000 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -12,6 +12,7 @@ #include <linux/atomic.h> #include <linux/container_of.h> #include <linux/uidgid.h> +#include <linux/kabi.h>
struct flow_keys;
@@ -42,6 +43,9 @@ struct flowi_common { kuid_t flowic_uid; __u32 flowic_multipath_hash; struct flowi_tunnel flowic_tun_key; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
union flowi_uli { @@ -88,6 +92,9 @@ struct flowi4 { #define fl4_icmp_code uli.icmpt.code #define fl4_mh_type uli.mht.type #define fl4_gre_key uli.gre_key + + KABI_RESERVE(1) + KABI_RESERVE(2) } __attribute__((__aligned__(BITS_PER_LONG/8)));
static inline void flowi4_init_output(struct flowi4 *fl4, int oif, diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h index 1a7131d6cb0e..88edb7988db9 100644 --- a/include/net/flow_dissector.h +++ b/include/net/flow_dissector.h @@ -7,6 +7,7 @@ #include <linux/siphash.h> #include <linux/string.h> #include <uapi/linux/if_ether.h> +#include <linux/kabi.h>
struct bpf_prog; struct net; @@ -401,6 +402,11 @@ struct flow_keys { struct flow_dissector_key_icmp icmp; /* 'addrs' must be the last member */ struct flow_dissector_key_addrs addrs; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#define FLOW_KEYS_HASH_OFFSET \ diff --git a/include/net/genetlink.h b/include/net/genetlink.h index c53244f20437..0a587c30a4cb 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -5,6 +5,7 @@ #include <linux/genetlink.h> #include <net/netlink.h> #include <net/net_namespace.h> +#include <linux/kabi.h>
#define GENLMSG_DEFAULT_SIZE (NLMSG_DEFAULT_SIZE - GENL_HDRLEN)
@@ -89,6 +90,9 @@ struct genl_family { int id; /* starting number of multicast group IDs in this family */ unsigned int mcgrp_offset; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/** @@ -113,6 +117,9 @@ struct genl_info { possible_net_t _net; void * user_ptr[2]; struct netlink_ext_ack *extack; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
static inline struct net *genl_info_net(const struct genl_info *info) @@ -195,6 +202,11 @@ struct genl_ops { u8 internal_flags; u8 flags; u8 validate; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/** diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 5d2fcc137b88..9b6512a297a7 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h @@ -20,6 +20,7 @@
#include <net/inet_sock.h> #include <net/request_sock.h> +#include <linux/kabi.h>
/* Cancel timers, when they are not required. */ #undef INET_CSK_CLEAR_TIMERS @@ -52,6 +53,9 @@ struct inet_connection_sock_af_ops { char __user *optval, int __user *optlen); void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); void (*mtu_reduced)(struct sock *sk); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/** inet_connection_sock - INET connection oriented sock @@ -135,6 +139,9 @@ struct inet_connection_sock { u32 icsk_probes_tstamp; u32 icsk_user_timeout;
+ KABI_RESERVE(1) + KABI_RESERVE(2) + u64 icsk_ca_priv[104 / sizeof(u64)]; #define ICSK_CA_PRIV_SIZE sizeof_field(struct inet_connection_sock, icsk_ca_priv) }; diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 1ba9f4ddf2f6..4564ac3f827b 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -68,6 +68,9 @@ struct fib6_config { struct nlattr *fc_encap; u16 fc_encap_type; bool fc_is_fdb; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct fib6_node { @@ -84,6 +87,9 @@ struct fib6_node { int fn_sernum; struct fib6_info __rcu *rr_ptr; struct rcu_head rcu; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct fib6_gc_args { @@ -206,6 +212,10 @@ struct fib6_info {
struct rcu_head rcu; struct nexthop *nh; + + KABI_RESERVE(1) + KABI_RESERVE(2) + struct fib6_nh fib6_nh[]; };
@@ -222,6 +232,9 @@ struct rt6_info {
/* more non-fragment space at head required */ unsigned short rt6i_nfheader_len; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct fib6_result { diff --git a/include/net/l3mdev.h b/include/net/l3mdev.h index 031c661aa14d..ba8dc2523c59 100644 --- a/include/net/l3mdev.h +++ b/include/net/l3mdev.h @@ -9,6 +9,7 @@
#include <net/dst.h> #include <net/fib_rules.h> +#include <linux/kabi.h>
enum l3mdev_type { L3MDEV_TYPE_UNSPEC, @@ -43,6 +44,11 @@ struct l3mdev_ops { /* IPv6 ops */ struct dst_entry * (*l3mdev_link_scope_lookup)(const struct net_device *dev, struct flowi6 *fl6); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#ifdef CONFIG_NET_L3_MASTER_DEV diff --git a/include/net/lwtunnel.h b/include/net/lwtunnel.h index 53bd2d02a4f0..8983aca5892f 100644 --- a/include/net/lwtunnel.h +++ b/include/net/lwtunnel.h @@ -7,6 +7,7 @@ #include <linux/skbuff.h> #include <linux/types.h> #include <net/route.h> +#include <linux/kabi.h>
#define LWTUNNEL_HASH_BITS 7 #define LWTUNNEL_HASH_SIZE (1 << LWTUNNEL_HASH_BITS) @@ -33,6 +34,12 @@ struct lwtunnel_state { int (*orig_output)(struct net *net, struct sock *sk, struct sk_buff *skb); int (*orig_input)(struct sk_buff *); struct rcu_head rcu; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + __u8 data[]; };
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 0d28172193fa..e4613823be58 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h @@ -29,6 +29,7 @@ #include <linux/sysctl.h> #include <linux/workqueue.h> #include <net/rtnetlink.h> +#include <linux/kabi.h>
/* * NUD stands for "neighbor unreachability detection" @@ -86,6 +87,9 @@ struct neigh_parms { u32 qlen; int data[NEIGH_VAR_DATA_MAX]; DECLARE_BITMAP(data_state, NEIGH_VAR_DATA_MAX); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
static inline void neigh_var_set(struct neigh_parms *p, int index, int val) @@ -162,6 +166,10 @@ struct neighbour { struct rcu_head rcu; struct net_device *dev; netdevice_tracker dev_tracker; + + KABI_RESERVE(1) + KABI_RESERVE(2) + u8 primary_key[]; } __randomize_layout;
@@ -234,6 +242,9 @@ struct neigh_table { struct neigh_statistics __percpu *stats; struct neigh_hash_table __rcu *nht; struct pneigh_entry **phash_buckets; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
enum { diff --git a/include/net/netdev_rx_queue.h b/include/net/netdev_rx_queue.h index cdcafb30d437..377f43745abf 100644 --- a/include/net/netdev_rx_queue.h +++ b/include/net/netdev_rx_queue.h @@ -21,6 +21,11 @@ struct netdev_rx_queue { #ifdef CONFIG_XDP_SOCKETS struct xsk_buff_pool *pool; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) } ____cacheline_aligned_in_smp;
/* diff --git a/include/net/netlink.h b/include/net/netlink.h index 8a7cd1170e1f..419dc7dce959 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h @@ -6,6 +6,7 @@ #include <linux/netlink.h> #include <linux/jiffies.h> #include <linux/in6.h> +#include <linux/kabi.h>
/* ======================================================================== * Netlink Messages and Attributes Interface (As Seen On TV) @@ -359,6 +360,10 @@ struct nla_policy { int (*validate)(const struct nlattr *attr, struct netlink_ext_ack *extack); }; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) };
#define NLA_POLICY_ETH_ADDR NLA_POLICY_EXACT_LEN(ETH_ALEN) diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 7a41c4791536..5458a4e96cb9 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -11,6 +11,7 @@ #include <linux/rcupdate.h> #include <linux/seqlock.h> #include <linux/siphash.h> +#include <linux/kabi.h>
struct ctl_table_header; struct ipv4_devconf; @@ -239,5 +240,12 @@ struct netns_ipv4 {
atomic_t rt_genid; siphash_key_t ip_id_key; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) }; #endif diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index 5f2cfd84570a..0409929f47c9 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h @@ -9,6 +9,7 @@ #define __NETNS_IPV6_H__ #include <net/dst_ops.h> #include <uapi/linux/icmpv6.h> +#include <linux/kabi.h>
struct ctl_table_header;
@@ -119,6 +120,9 @@ struct netns_ipv6 { u32 seq; } ip6addrlbl_table; struct ioam6_pernet_data *ioam6_data; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) diff --git a/include/net/netns/nftables.h b/include/net/netns/nftables.h index cc8060c017d5..48929023eaee 100644 --- a/include/net/netns/nftables.h +++ b/include/net/netns/nftables.h @@ -1,9 +1,13 @@ /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _NETNS_NFTABLES_H_ #define _NETNS_NFTABLES_H_ +#include <linux/kabi.h>
struct netns_nftables { u8 gencursor; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
#endif diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h index 423b52eca908..a0c1359cc7eb 100644 --- a/include/net/netns/xfrm.h +++ b/include/net/netns/xfrm.h @@ -8,6 +8,7 @@ #include <linux/rhashtable-types.h> #include <linux/xfrm.h> #include <net/dst_ops.h> +#include <linux/kabi.h>
struct ctl_table_header;
@@ -83,6 +84,9 @@ struct netns_xfrm {
spinlock_t xfrm_policy_lock; struct mutex xfrm_cfg_mutex; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
#endif diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h index 887e7946a597..b5b6d0438c38 100644 --- a/include/net/page_pool/types.h +++ b/include/net/page_pool/types.h @@ -5,6 +5,7 @@
#include <linux/dma-direction.h> #include <linux/ptr_ring.h> +#include <linux/kabi.h>
#define PP_FLAG_DMA_MAP BIT(0) /* Should page_pool do the DMA * map/unmap @@ -180,6 +181,9 @@ struct page_pool { refcount_t user_cnt;
u64 destroy_cnt; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct page *page_pool_alloc_pages(struct page_pool *pool, gfp_t gfp); diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 6506221c5fe3..4f89b2730e7b 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h @@ -4,6 +4,7 @@
#include <linux/rtnetlink.h> #include <net/netlink.h> +#include <linux/kabi.h>
typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, struct netlink_ext_ack *); @@ -134,6 +135,15 @@ struct rtnl_link_ops { int (*fill_linkxstats)(struct sk_buff *skb, const struct net_device *dev, int *prividx, int attr); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
int __rtnl_link_register(struct rtnl_link_ops *ops); diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index f232512505f8..29e97f146de7 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -19,6 +19,7 @@ #include <net/gen_stats.h> #include <net/rtnetlink.h> #include <net/flow_offload.h> +#include <linux/kabi.h>
struct Qdisc_ops; struct qdisc_walker; @@ -126,6 +127,10 @@ struct Qdisc {
struct rcu_head rcu; netdevice_tracker dev_tracker; + + KABI_RESERVE(1) + KABI_RESERVE(2) + /* private data */ long privdata[] ____cacheline_aligned; }; @@ -277,6 +282,9 @@ struct Qdisc_class_ops { struct sk_buff *skb, struct tcmsg*); int (*dump_stats)(struct Qdisc *, unsigned long, struct gnet_dump *); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* Qdisc_class_ops flag values */ @@ -322,6 +330,9 @@ struct Qdisc_ops { u32 (*egress_block_get)(struct Qdisc *sch);
struct module *owner; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
diff --git a/include/net/sock.h b/include/net/sock.h index ea3ef223a942..589758ed6cd4 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -69,6 +69,7 @@ #include <linux/net_tstamp.h> #include <net/l3mdev.h> #include <uapi/linux/socket.h> +#include <linux/kabi.h>
/* * This structure really needs to be cleaned up. @@ -553,6 +554,14 @@ struct sock { u64 sk_gid_padding; }; #endif + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
enum sk_pacing { @@ -1376,6 +1385,15 @@ struct proto {
struct list_head node; int (*diag_destroy)(struct sock *sk, int err); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) } __randomize_layout;
int proto_register(struct proto *prot, int alloc_slab); diff --git a/include/net/switchdev.h b/include/net/switchdev.h index a43062d4c734..5b87839d61d0 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -11,6 +11,7 @@ #include <linux/notifier.h> #include <linux/list.h> #include <net/ip_fib.h> +#include <linux/kabi.h>
#define SWITCHDEV_F_NO_RECURSE BIT(0) #define SWITCHDEV_F_SKIP_EOPNOTSUPP BIT(1) @@ -90,6 +91,11 @@ struct switchdev_obj { u32 flags; void *complete_priv; void (*complete)(struct net_device *dev, int err, void *priv); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* SWITCHDEV_OBJ_ID_PORT_VLAN */ diff --git a/include/net/tls.h b/include/net/tls.h index a2b44578dcb7..4fa58e4afae5 100644 --- a/include/net/tls.h +++ b/include/net/tls.h @@ -48,6 +48,7 @@ #include <net/strparser.h> #include <crypto/aead.h> #include <uapi/linux/tls.h> +#include <linux/kabi.h>
struct tls_rec;
@@ -146,6 +147,10 @@ struct tls_record_info { u32 end_seq; int len; int num_frags; + + KABI_RESERVE(1) + KABI_RESERVE(2) + skb_frag_t frags[MAX_SKB_FRAGS]; };
@@ -195,6 +200,11 @@ enum tls_context_flags { struct cipher_context { char *iv; char *rec_seq; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
union tls_crypto_context { @@ -265,6 +275,11 @@ struct tls_context { struct list_head list; refcount_t refcount; struct rcu_head rcu; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
enum tls_offload_ctx_dir { diff --git a/include/net/xsk_buff_pool.h b/include/net/xsk_buff_pool.h index b0bdff26fc88..92a8e97826b9 100644 --- a/include/net/xsk_buff_pool.h +++ b/include/net/xsk_buff_pool.h @@ -9,6 +9,7 @@ #include <linux/dma-mapping.h> #include <linux/bpf.h> #include <net/xdp.h> +#include <linux/kabi.h>
struct xsk_buff_pool; struct xdp_rxq_info; @@ -87,6 +88,8 @@ struct xsk_buff_pool { * sockets share a single cq when the same netdev and queue id is shared. */ spinlock_t cq_lock; + KABI_RESERVE(1) + KABI_RESERVE(2) struct xdp_buff_xsk *free_heads[]; };
diff --git a/net/devlink/devl_internal.h b/net/devlink/devl_internal.h index f6b5fea2e13c..be7386dbf80f 100644 --- a/net/devlink/devl_internal.h +++ b/net/devlink/devl_internal.h @@ -14,6 +14,7 @@ #include <net/net_namespace.h> #include <net/rtnetlink.h> #include <rdma/ib_verbs.h> +#include <linux/kabi.h>
#include "netlink_gen.h"
@@ -55,6 +56,10 @@ struct devlink { u8 reload_failed:1; refcount_t refcount; struct rcu_work rwork; + + KABI_RESERVE(1) + KABI_RESERVE(2) + char priv[] __aligned(NETDEV_ALIGN); };
From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC
----------------------------------------------------
Reserve some fields beforehand for net bpf framework related structures prone to change.
Signed-off-by: Wang Hai wanghai38@huawei.com Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- include/linux/skmsg.h | 11 +++++++++++ include/net/tcp.h | 6 ++++++ include/net/xdp.h | 6 ++++++ 3 files changed, 23 insertions(+)
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index c953b8c0d2f4..03fdbb75d2cf 100644 --- a/include/linux/skmsg.h +++ b/include/linux/skmsg.h @@ -12,6 +12,7 @@ #include <net/sock.h> #include <net/tcp.h> #include <net/strparser.h> +#include <linux/kabi.h>
#define MAX_MSG_FRAGS MAX_SKB_FRAGS #define NR_MSG_FRAG_IDS (MAX_MSG_FRAGS + 1) @@ -58,6 +59,11 @@ struct sk_psock_progs { struct bpf_prog *stream_parser; struct bpf_prog *stream_verdict; struct bpf_prog *skb_verdict; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
enum sk_psock_state_bits { @@ -108,6 +114,11 @@ struct sk_psock { struct delayed_work work; struct sock *sk_pair; struct rcu_work rwork; + + 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, diff --git a/include/net/tcp.h b/include/net/tcp.h index 6f821f37e5aa..f4adfba58b31 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -45,6 +45,7 @@ #include <linux/memcontrol.h> #include <linux/bpf-cgroup.h> #include <linux/siphash.h> +#include <linux/kabi.h>
extern struct inet_hashinfo tcp_hashinfo;
@@ -1112,6 +1113,11 @@ struct tcp_congestion_ops { void (*init)(struct sock *sk); /* cleanup private data (optional) */ void (*release)(struct sock *sk); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) } ____cacheline_aligned_in_smp;
int tcp_register_congestion_control(struct tcp_congestion_ops *type); diff --git a/include/net/xdp.h b/include/net/xdp.h index de08c8e0d134..c283668458ca 100644 --- a/include/net/xdp.h +++ b/include/net/xdp.h @@ -10,6 +10,7 @@ #include <linux/filter.h> #include <linux/netdevice.h> #include <linux/skbuff.h> /* skb_shared_info */ +#include <linux/kabi.h>
/** * DOC: XDP RX-queue information @@ -64,6 +65,11 @@ struct xdp_rxq_info { struct xdp_mem_info mem; unsigned int napi_id; u32 frag_size; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) } ____cacheline_aligned; /* perf critical, avoid false-sharing */
struct xdp_txq_info {
From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC
----------------------------------------------------
Reserve some fields beforehand for net can framework related structures prone to change.
Signed-off-by: Wang Hai wanghai38@huawei.com Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- include/linux/can/core.h | 4 ++++ include/linux/can/dev.h | 6 ++++++ include/linux/can/rx-offload.h | 4 ++++ include/net/netns/can.h | 4 ++++ 4 files changed, 18 insertions(+)
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index 5fb8d0e3f9c1..b939f271c108 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h @@ -17,6 +17,7 @@ #include <linux/can.h> #include <linux/skbuff.h> #include <linux/netdevice.h> +#include <linux/kabi.h>
#define DNAME(dev) ((dev) ? (dev)->name : "any")
@@ -32,6 +33,9 @@ struct can_proto { int protocol; const struct proto_ops *ops; struct proto *prot; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* required_size diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 982ba245eb41..7e52cc527f86 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h @@ -22,6 +22,7 @@ #include <linux/can/skb.h> #include <linux/ethtool.h> #include <linux/netdevice.h> +#include <linux/kabi.h>
/* * CAN mode @@ -85,6 +86,11 @@ struct can_priv { int (*do_get_berr_counter)(const struct net_device *dev, struct can_berr_counter *bec); int (*do_get_auto_tdcv)(const struct net_device *dev, u32 *tdcv); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
static inline bool can_tdc_is_enabled(const struct can_priv *priv) diff --git a/include/linux/can/rx-offload.h b/include/linux/can/rx-offload.h index d29bb4521947..0ab226a518fc 100644 --- a/include/linux/can/rx-offload.h +++ b/include/linux/can/rx-offload.h @@ -11,6 +11,7 @@
#include <linux/netdevice.h> #include <linux/can.h> +#include <linux/kabi.h>
struct can_rx_offload { struct net_device *dev; @@ -29,6 +30,9 @@ struct can_rx_offload { struct napi_struct napi;
bool inc; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
int can_rx_offload_add_timestamp(struct net_device *dev, diff --git a/include/net/netns/can.h b/include/net/netns/can.h index 48b79f7e6236..45fb7ee5d7c7 100644 --- a/include/net/netns/can.h +++ b/include/net/netns/can.h @@ -8,6 +8,7 @@
#include <linux/spinlock.h> #include <linux/timer.h> +#include <linux/kabi.h>
struct can_dev_rcv_lists; struct can_pkg_stats; @@ -36,6 +37,9 @@ struct netns_can {
/* CAN GW per-net gateway jobs */ struct hlist_head cgw_list; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
#endif /* __NETNS_CAN_H__ */
From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC
----------------------------------------------------
Reserve some fields beforehand for net netfilter framework related structures prone to change.
Signed-off-by: Wang Hai wanghai38@huawei.com Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- include/linux/netfilter.h | 13 +++++++++++++ include/linux/netfilter/ipset/ip_set.h | 10 ++++++++++ include/linux/netfilter/nfnetlink.h | 7 +++++++ include/linux/netfilter_ipv6.h | 4 ++++ include/net/netfilter/nf_conntrack.h | 4 ++++ include/net/netns/netfilter.h | 4 ++++ 6 files changed, 42 insertions(+)
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index d68644b7c299..94fac194a7b1 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h @@ -16,6 +16,7 @@ #include <linux/netdevice.h> #include <linux/sockptr.h> #include <net/net_namespace.h> +#include <linux/kabi.h>
static inline int NF_DROP_GETERR(int verdict) { @@ -179,6 +180,9 @@ struct nf_sockopt_ops { int (*get)(struct sock *sk, int optval, void __user *user, int *len); /* Use the module struct to lock set/get code in place */ struct module *owner; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* Function to register/unregister hook points. */ @@ -377,6 +381,9 @@ struct nf_nat_hook { enum nf_nat_manip_type mtype, enum ip_conntrack_dir dir); void (*remove_nat_bysrc)(struct nf_conn *ct); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
extern const struct nf_nat_hook __rcu *nf_nat_hook; @@ -464,6 +471,9 @@ struct nf_ct_hook { const struct sk_buff *); void (*attach)(struct sk_buff *nskb, const struct sk_buff *skb); void (*set_closing)(struct nf_conntrack *nfct); + + KABI_RESERVE(1) + KABI_RESERVE(2) }; extern const struct nf_ct_hook __rcu *nf_ct_hook;
@@ -479,6 +489,9 @@ struct nfnl_ct_hook { u32 portid, u32 report); void (*seq_adjust)(struct sk_buff *skb, struct nf_conn *ct, enum ip_conntrack_info ctinfo, s32 off); + + KABI_RESERVE(1) + KABI_RESERVE(2) }; extern const struct nfnl_ct_hook __rcu *nfnl_ct_hook;
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h index e8c350a3ade1..3f080eb08625 100644 --- a/include/linux/netfilter/ipset/ip_set.h +++ b/include/linux/netfilter/ipset/ip_set.h @@ -16,6 +16,7 @@ #include <linux/vmalloc.h> #include <net/netlink.h> #include <uapi/linux/netfilter/ipset/ip_set.h> +#include <linux/kabi.h>
#define _IP_SET_MODULE_DESC(a, b, c) \ MODULE_DESCRIPTION(a " type of IP sets, revisions " b "-" c) @@ -188,6 +189,9 @@ struct ip_set_type_variant { bool (*same_set)(const struct ip_set *a, const struct ip_set *b); /* Region-locking is used */ bool region_lock; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct ip_set_region { @@ -234,6 +238,9 @@ struct ip_set_type {
/* Set this to THIS_MODULE if you are a module, otherwise NULL */ struct module *me; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* register and unregister set type */ @@ -276,6 +283,9 @@ struct ip_set { size_t offset[IPSET_EXT_ID_MAX]; /* The type specific data */ void *data; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
static inline void diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index e9a9ab34a7cc..6fb2d5942810 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h @@ -6,6 +6,7 @@ #include <linux/capability.h> #include <net/netlink.h> #include <uapi/linux/netfilter/nfnetlink.h> +#include <linux/kabi.h>
struct nfnl_info { struct net *net; @@ -28,6 +29,9 @@ struct nfnl_callback { const struct nla_policy *policy; enum nfnl_callback_type type; __u16 attr_count; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
enum nfnl_abort_action { @@ -46,6 +50,9 @@ struct nfnetlink_subsystem { int (*abort)(struct net *net, struct sk_buff *skb, enum nfnl_abort_action action); bool (*valid_genid)(struct net *net, u32 genid); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n); diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 7834c0be2831..2a81551cdb75 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h @@ -9,6 +9,7 @@
#include <uapi/linux/netfilter_ipv6.h> #include <net/tcp.h> +#include <linux/kabi.h>
/* Check for an extension */ static inline int @@ -65,6 +66,9 @@ struct nf_ipv6_ops { const struct nf_bridge_frag_data *data, struct sk_buff *)); #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) };
#ifdef CONFIG_NETFILTER diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index bb7fd376a8c5..f2a2c2c69175 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h @@ -23,6 +23,7 @@ #include <linux/netfilter/nf_conntrack_proto_gre.h>
#include <net/netfilter/nf_conntrack_tuple.h> +#include <linux/kabi.h>
struct nf_ct_udp { unsigned long stream_ts; @@ -123,6 +124,9 @@ struct nf_conn {
/* Storage reserved for other modules, must be the last member */ union nf_conntrack_proto proto; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
static inline struct nf_conn * diff --git a/include/net/netns/netfilter.h b/include/net/netns/netfilter.h index 02bbdc577f8e..4b77a9b031b6 100644 --- a/include/net/netns/netfilter.h +++ b/include/net/netns/netfilter.h @@ -3,6 +3,7 @@ #define __NETNS_NETFILTER_H
#include <linux/netfilter_defs.h> +#include <linux/kabi.h>
struct proc_dir_entry; struct nf_logger; @@ -30,5 +31,8 @@ struct netns_nf { #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) unsigned int defrag_ipv6_users; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) }; #endif
From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC
----------------------------------------------------
Reserve some fields beforehand for net rdma framework related structures prone to change.
Signed-off-by: Wang Hai wanghai38@huawei.com Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- include/rdma/ib_addr.h | 4 ++++ include/rdma/rdma_cm.h | 10 ++++++++++ include/rdma/rdma_counter.h | 4 ++++ include/rdma/rdma_netlink.h | 4 ++++ include/rdma/rdma_vt.h | 7 +++++++ include/rdma/rdmavt_qp.h | 5 +++++ 6 files changed, 34 insertions(+)
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index 811a0f11d0db..15307804a1a9 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h @@ -21,6 +21,7 @@ #include <rdma/ib_verbs.h> #include <rdma/ib_pack.h> #include <net/net_namespace.h> +#include <linux/kabi.h>
/** * struct rdma_dev_addr - Contains resolved RDMA hardware addresses @@ -44,6 +45,9 @@ struct rdma_dev_addr { const struct ib_gid_attr *sgid_attr; enum rdma_network_type network; int hoplimit; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/** diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index 8a8ab2f793ab..aab31385fdce 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h @@ -12,6 +12,7 @@ #include <rdma/ib_addr.h> #include <rdma/ib_sa.h> #include <uapi/rdma/rdma_user_cm.h> +#include <linux/kabi.h>
/* * Upon receiving a device removal event, users must destroy the associated @@ -77,6 +78,9 @@ struct rdma_conn_param { u8 srq; u32 qp_num; u32 qkey; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rdma_ud_param { @@ -95,6 +99,9 @@ struct rdma_cm_event { struct rdma_ud_param ud; } param; struct rdma_ucm_ece ece; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rdma_cm_id; @@ -119,6 +126,9 @@ struct rdma_cm_id { enum ib_qp_type qp_type; u32 port_num; struct work_struct net_work; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rdma_cm_id * diff --git a/include/rdma/rdma_counter.h b/include/rdma/rdma_counter.h index 45d5481a7846..bbbe5a3e7c76 100644 --- a/include/rdma/rdma_counter.h +++ b/include/rdma/rdma_counter.h @@ -11,6 +11,7 @@
#include <rdma/restrack.h> #include <rdma/rdma_netlink.h> +#include <linux/kabi.h>
struct ib_device; struct ib_qp; @@ -41,6 +42,9 @@ struct rdma_counter { struct mutex lock; struct rdma_hw_stats *stats; u32 port; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
void rdma_counter_init(struct ib_device *dev); diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h index c2a79aeee113..e822c977b8af 100644 --- a/include/rdma/rdma_netlink.h +++ b/include/rdma/rdma_netlink.h @@ -5,6 +5,7 @@
#include <linux/netlink.h> #include <uapi/rdma/rdma_netlink.h> +#include <linux/kabi.h>
enum { RDMA_NLDEV_ATTR_EMPTY_STRING = 1, @@ -114,6 +115,9 @@ struct rdma_link_ops { struct list_head list; const char *type; int (*newlink)(const char *ibdev_name, struct net_device *ndev); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
void rdma_link_register(struct rdma_link_ops *ops); diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h index c429d6ddb129..5b262b7c0b53 100644 --- a/include/rdma/rdma_vt.h +++ b/include/rdma/rdma_vt.h @@ -17,6 +17,7 @@ #include <rdma/ib_verbs.h> #include <rdma/ib_mad.h> #include <rdma/rdmavt_mr.h> +#include <linux/kabi.h>
#define RVT_MAX_PKEY_VALUES 16
@@ -105,6 +106,9 @@ struct rvt_ibport { */ struct trap_list trap_lists[RVT_MAX_TRAP_LISTS]; struct timer_list trap_timer; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
#define RVT_CQN_MAX 16 /* maximum length of cq name */ @@ -426,6 +430,9 @@ struct rvt_dev_info {
/* Memory Working Set Size */ struct rvt_wss *wss; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/** diff --git a/include/rdma/rdmavt_qp.h b/include/rdma/rdmavt_qp.h index 2e58d5e6ac0e..2e887cc48d8d 100644 --- a/include/rdma/rdmavt_qp.h +++ b/include/rdma/rdmavt_qp.h @@ -11,6 +11,7 @@ #include <rdma/ib_verbs.h> #include <rdma/rdmavt_cq.h> #include <rdma/rvt-abi.h> +#include <linux/kabi.h> /* * Atomic bit definitions for r_aflags. */ @@ -441,6 +442,10 @@ struct rvt_qp {
atomic_t local_ops_pending; /* number of fast_reg/local_inv reqs */
+ + KABI_RESERVE(1) + KABI_RESERVE(2) + /* * This sge list MUST be last. Do not add anything below here. */
From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8OWRC
----------------------------------------------------
Reserve some fields beforehand for net sunrpc framework related structures prone to change.
Signed-off-by: Wang Hai wanghai38@huawei.com Signed-off-by: Zhengchao Shao shaozhengchao@huawei.com --- include/linux/sunrpc/cache.h | 4 ++++ include/linux/sunrpc/clnt.h | 12 ++++++++++++ include/linux/sunrpc/sched.h | 15 +++++++++++++++ include/linux/sunrpc/stats.h | 7 +++++++ include/linux/sunrpc/xprt.h | 17 +++++++++++++++++ 5 files changed, 55 insertions(+)
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 35766963dd14..3281bbb28eb2 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -16,6 +16,7 @@ #include <linux/atomic.h> #include <linux/kstrtox.h> #include <linux/proc_fs.h> +#include <linux/kabi.h>
/* * Each cache requires: @@ -123,6 +124,9 @@ struct cache_detail { struct dentry *pipefs; }; struct net *net; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* this must be embedded in any request structure that diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index e9d4377d03c6..3eddb3493de2 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -28,6 +28,7 @@ #include <linux/path.h> #include <net/ipv6.h> #include <linux/sunrpc/xprtmultipath.h> +#include <linux/kabi.h>
struct rpc_inode; struct rpc_sysfs_client { @@ -93,6 +94,11 @@ struct rpc_clnt { const struct cred *cl_cred; unsigned int cl_max_connect; /* max number of transports not to the same IP */ struct super_block *pipefs_sb; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* @@ -106,6 +112,9 @@ struct rpc_program { const struct rpc_version ** version; /* version array */ struct rpc_stat * stats; /* statistics */ const char * pipe_dir_name; /* path to rpc_pipefs dir */ + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rpc_version { @@ -151,6 +160,9 @@ struct rpc_create_args { struct xprtsec_parms xprtsec; unsigned long connect_timeout; unsigned long reconnect_timeout; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rpc_add_xprt_test { diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 8ada7dc802d3..b29453da8c85 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -17,6 +17,7 @@ #include <linux/wait_bit.h> #include <linux/workqueue.h> #include <linux/sunrpc/xdr.h> +#include <linux/kabi.h>
/* * This is the actual RPC procedure call info. @@ -27,6 +28,9 @@ struct rpc_message { void * rpc_argp; /* Arguments */ void * rpc_resp; /* Result */ const struct cred * rpc_cred; /* Credentials */ + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rpc_call_ops; @@ -91,6 +95,11 @@ struct rpc_task { unsigned char tk_priority : 2,/* Task priority */ tk_garb_retry : 2, tk_cred_retry : 2; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
typedef void (*rpc_action)(struct rpc_task *); @@ -100,6 +109,9 @@ struct rpc_call_ops { void (*rpc_call_done)(struct rpc_task *, void *); void (*rpc_count_stats)(struct rpc_task *, void *); void (*rpc_release)(void *); + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct rpc_task_setup { @@ -113,6 +125,9 @@ struct rpc_task_setup { struct workqueue_struct *workqueue; unsigned short flags; signed char priority; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
/* diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h index 3ce1550d1beb..e295b0f805cb 100644 --- a/include/linux/sunrpc/stats.h +++ b/include/linux/sunrpc/stats.h @@ -11,6 +11,7 @@ #define _LINUX_SUNRPC_STATS_H
#include <linux/proc_fs.h> +#include <linux/kabi.h>
struct rpc_stat { const struct rpc_program *program; @@ -24,6 +25,9 @@ struct rpc_stat { rpcretrans, rpcauthrefresh, rpcgarbage; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct svc_stat { @@ -37,6 +41,9 @@ struct svc_stat { rpcbadfmt, rpcbadauth, rpcbadclnt; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct net; diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 4ecc89301eb7..44ab7f2c38a4 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -18,6 +18,7 @@ #include <linux/sunrpc/sched.h> #include <linux/sunrpc/xdr.h> #include <linux/sunrpc/msg_prot.h> +#include <linux/kabi.h>
#define RPC_MIN_SLOT_TABLE (2U) #define RPC_DEF_SLOT_TABLE (16U) @@ -39,6 +40,9 @@ struct rpc_timeout { to_increment; /* if !exponential */ unsigned int to_retries; /* max # of retries */ unsigned char to_exponential; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
enum rpc_display_format_t { @@ -125,6 +129,11 @@ struct rpc_rqst { unsigned long rq_bc_pa_state; /* Backchannel prealloc state */ struct list_head rq_bc_pa_list; /* Backchannel prealloc list */ #endif /* CONFIG_SUNRPC_BACKCHANEL */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; #define rq_svec rq_snd_buf.head #define rq_slen rq_snd_buf.len @@ -315,6 +324,11 @@ struct rpc_xprt { const struct xprt_class *xprt_class; struct rpc_sysfs_xprt *xprt_sysfs; bool main; /*mark if this is the 1st transport */ + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#if defined(CONFIG_SUNRPC_BACKCHANNEL) @@ -353,6 +367,9 @@ struct xprt_create { struct xprtsec_parms xprtsec; unsigned long connect_timeout; unsigned long reconnect_timeout; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
struct xprt_class {