From: Wang Hai wanghai38@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4HE7P?from=project-issue CVE: NA
--------
Reserve some fields beforehand for net base framework related structures prone to change.
---------
Signed-off-by: Wang Hai wanghai38@huawei.com Reviewed-by: Wei Yongjun weiyongjun1@huawei.com Reviewed-by: Yue Haibing yuehaibing@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- include/linux/device.h | 10 +++++++ include/linux/device/class.h | 6 ++++ include/linux/ethtool.h | 6 ++++ include/linux/ipv6.h | 6 ++++ include/linux/net.h | 6 ++++ include/linux/netdevice.h | 47 ++++++++++++++++++++++++++++++ include/linux/skbuff.h | 6 ++++ include/net/dcbnl.h | 9 ++++++ include/net/dst.h | 10 +++++++ include/net/dst_ops.h | 10 +++++++ include/net/fib_rules.h | 10 +++++++ include/net/flow.h | 10 +++++++ include/net/genetlink.h | 10 +++++++ include/net/inet_connection_sock.h | 5 ++++ include/net/ip6_fib.h | 9 ++++++ include/net/l3mdev.h | 6 ++++ include/net/lwtunnel.h | 7 +++++ include/net/neighbour.h | 8 +++++ include/net/netlink.h | 5 ++++ include/net/netns/ipv4.h | 8 +++++ include/net/netns/ipv6.h | 3 ++ include/net/netns/nftables.h | 3 ++ include/net/netns/xfrm.h | 3 ++ include/net/page_pool.h | 3 ++ include/net/rtnetlink.h | 10 +++++++ include/net/sch_generic.h | 7 +++++ include/net/sock.h | 19 ++++++++++++ include/net/switchdev.h | 6 ++++ include/net/tls.h | 5 ++++ include/net/xfrm.h | 6 ++++ 30 files changed, 259 insertions(+)
diff --git a/include/linux/device.h b/include/linux/device.h index 5dc0f81e4f9d..f14c248df848 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -30,6 +30,7 @@ #include <linux/device/bus.h> #include <linux/device/class.h> #include <linux/device/driver.h> +#include <linux/kabi.h> #include <asm/device.h>
struct device; @@ -558,6 +559,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 e8d470c457d1..20d954100cc7 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; @@ -75,6 +76,11 @@ struct class { const struct dev_pm_ops *pm;
struct subsys_private *p; + + 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 0074c2e12cb5..726c1b27f3c4 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -17,6 +17,7 @@ #include <linux/compat.h> #include <linux/netlink.h> #include <uapi/linux/ethtool.h> +#include <linux/kabi.h>
struct compat_ethtool_rx_flow_spec { u32 flow_type; @@ -544,6 +545,11 @@ struct ethtool_ops { const struct ethtool_tunable *, void *); int (*set_phy_tunable)(struct net_device *, const struct ethtool_tunable *, const void *); + + 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/ipv6.h b/include/linux/ipv6.h index f514a7dd8c9c..0e6f5d2785e9 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) @@ -77,6 +78,11 @@ struct ipv6_devconf { __s32 rpl_seg_enabled;
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 0dcd51feef02..b40865005020 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; @@ -203,6 +204,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 4fdeccf22378..1335981945d9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -48,6 +48,7 @@ #include <uapi/linux/if_bonding.h> #include <uapi/linux/pkt_cls.h> #include <linux/hashtable.h> +#include <linux/kabi.h>
struct netpoll_info; struct device; @@ -278,6 +279,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 @@ -347,6 +351,11 @@ struct napi_struct { struct list_head dev_list; struct hlist_node napi_hash_node; unsigned int napi_id; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
enum { @@ -621,6 +630,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; @@ -744,6 +758,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;
/* @@ -924,6 +943,11 @@ struct xfrmdev_ops { bool (*xdo_dev_offload_ok) (struct sk_buff *skb, struct xfrm_state *x); void (*xdo_dev_state_advance_esn) (struct xfrm_state *x); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) }; #endif
@@ -1487,6 +1511,15 @@ struct net_device_ops { int (*ndo_tunnel_ctl)(struct net_device *dev, struct ip_tunnel_parm *p, int cmd); struct net_device * (*ndo_get_peer_dev)(struct net_device *dev); + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) + KABI_RESERVE(5) + KABI_RESERVE(6) + KABI_RESERVE(7) + KABI_RESERVE(8) };
/** @@ -2173,6 +2206,15 @@ struct net_device {
/* protected by rtnl_lock */ struct bpf_xdp_entity xdp_state[__MAX_XDP_MODE]; + + 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)
@@ -2545,6 +2587,11 @@ struct packet_type { struct sock *sk); 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 2529415e3483..9e3a454d2377 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -38,6 +38,7 @@ #include <linux/if_packet.h> #include <net/flow.h> #include <net/page_pool.h> +#include <linux/kabi.h> #if IS_ENABLED(CONFIG_NF_CONNTRACK) #include <linux/netfilter/nf_conntrack_common.h> #endif @@ -913,6 +914,11 @@ struct sk_buff { __u32 headers_end[0]; /* public: */
+ 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 e4ad58c4062c..22cf936bf774 100644 --- a/include/net/dcbnl.h +++ b/include/net/dcbnl.h @@ -107,6 +107,15 @@ struct dcbnl_rtnl_ops { /* buffer settings */ int (*dcbnl_getbuffer)(struct net_device *, struct dcbnl_buffer *); int (*dcbnl_setbuffer)(struct net_device *, struct dcbnl_buffer *); + + 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 acd15c544cf3..633e79e69d5a 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -18,6 +18,7 @@ #include <linux/refcount.h> #include <net/neighbour.h> #include <asm/processor.h> +#include <linux/kabi.h>
struct sk_buff;
@@ -76,6 +77,15 @@ struct dst_entry { #ifndef CONFIG_64BIT atomic_t __refcnt; /* 32-bit offset 64 */ #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 88ff7bb2bb9b..250e23188858 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 4b10676c69d1..17296ab1dcd5 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 b2531df3f65f..104b8b2d720c 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -13,6 +13,7 @@ #include <linux/atomic.h> #include <net/flow_dissector.h> #include <linux/uidgid.h> +#include <linux/kabi.h>
/* * ifindex generation is per-net namespace, and loopback is @@ -41,6 +42,9 @@ struct flowi_common { kuid_t flowic_uid; struct flowi_tunnel flowic_tun_key; __u32 flowic_multipath_hash; + + KABI_RESERVE(1) + KABI_RESERVE(2) };
union flowi_uli { @@ -93,6 +97,9 @@ struct flowi4 { #define fl4_ipsec_spi uli.spi #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, @@ -169,6 +176,9 @@ struct flowidn { union flowi_uli uli; #define fld_sport uli.ports.sport #define fld_dport uli.ports.dport + + KABI_RESERVE(1) + KABI_RESERVE(2) } __attribute__((__aligned__(BITS_PER_LONG/8)));
struct flowi { diff --git a/include/net/genetlink.h b/include/net/genetlink.h index e55ec1597ce7..f927ba671e4b 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)
@@ -67,6 +68,8 @@ struct genl_family { const struct genl_small_ops *small_ops; const struct genl_multicast_group *mcgrps; struct module *module; + + KABI_RESERVE(1) };
/** @@ -91,6 +94,8 @@ struct genl_info { possible_net_t _net; void * user_ptr[2]; struct netlink_ext_ack *extack; + + KABI_RESERVE(1) };
static inline struct net *genl_info_net(struct genl_info *info) @@ -158,6 +163,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 0b1864a82d4a..04c7ddda2f37 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 @@ -51,6 +52,8 @@ 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) };
/** inet_connection_sock - INET connection oriented sock @@ -134,6 +137,8 @@ struct inet_connection_sock { u32 icsk_probes_tstamp; u32 icsk_user_timeout;
+ KABI_RESERVE(1) + u64 icsk_ca_priv[104 / sizeof(u64)]; #define ICSK_CA_PRIV_SIZE (13 * sizeof(u64)) }; diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index ac5ff3c3afb1..d19b3077a56c 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -67,6 +67,8 @@ struct fib6_config { struct nlattr *fc_encap; u16 fc_encap_type; bool fc_is_fdb; + + KABI_RESERVE(1) };
struct fib6_node { @@ -83,6 +85,8 @@ struct fib6_node { int fn_sernum; struct fib6_info __rcu *rr_ptr; struct rcu_head rcu; + + KABI_RESERVE(1) };
struct fib6_gc_args { @@ -199,6 +203,9 @@ struct fib6_info {
struct rcu_head rcu; struct nexthop *nh; + + KABI_RESERVE(1) + struct fib6_nh fib6_nh[]; };
@@ -218,6 +225,8 @@ struct rt6_info {
/* more non-fragment space at head required */ unsigned short rt6i_nfheader_len; + + KABI_RESERVE(1) };
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 05cfd6ff6528..13a5062a66f4 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) @@ -30,6 +31,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 d5767e25509c..94ba37f4c902 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" @@ -83,6 +84,8 @@ struct neigh_parms { int reachable_time; int data[NEIGH_VAR_DATA_MAX]; DECLARE_BITMAP(data_state, NEIGH_VAR_DATA_MAX); + + KABI_RESERVE(1) };
static inline void neigh_var_set(struct neigh_parms *p, int index, int val) @@ -157,6 +160,9 @@ struct neighbour { struct list_head gc_list; struct rcu_head rcu; struct net_device *dev; + + KABI_RESERVE(1) + u8 primary_key[0]; } __randomize_layout;
@@ -226,6 +232,8 @@ struct neigh_table { struct neigh_statistics __percpu *stats; struct neigh_hash_table __rcu *nht; struct pneigh_entry **phash_buckets; + + KABI_RESERVE(1) };
enum { diff --git a/include/net/netlink.h b/include/net/netlink.h index 7356f41d23ba..624a92313aaa 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) @@ -348,6 +349,10 @@ struct nla_policy { */ u16 strict_start_type; }; + + 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 8e4fcac4df72..e8bddb5790c0 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -10,6 +10,7 @@ #include <net/inet_frag.h> #include <linux/rcupdate.h> #include <linux/siphash.h> +#include <linux/kabi.h>
struct tcpm_hash_bucket; struct ctl_table_header; @@ -227,5 +228,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 5ec054473d81..ce5ed87accda 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;
@@ -115,6 +116,8 @@ struct netns_ipv6 { spinlock_t lock; u32 seq; } ip6addrlbl_table; + + KABI_RESERVE(1) };
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) diff --git a/include/net/netns/nftables.h b/include/net/netns/nftables.h index 6c0806bd8d1e..4d9c11e334fb 100644 --- a/include/net/netns/nftables.h +++ b/include/net/netns/nftables.h @@ -3,6 +3,7 @@ #define _NETNS_NFTABLES_H_
#include <linux/list.h> +#include <linux/kabi.h>
struct netns_nftables { struct list_head tables; @@ -13,6 +14,8 @@ struct netns_nftables { unsigned int base_seq; u8 gencursor; u8 validate_state; + + KABI_RESERVE(1) };
#endif diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h index 22e1bc72b979..9144e0f09a30 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;
@@ -78,6 +79,8 @@ struct netns_xfrm {
spinlock_t xfrm_policy_lock; struct mutex xfrm_cfg_mutex; + + KABI_RESERVE(1) };
#endif diff --git a/include/net/page_pool.h b/include/net/page_pool.h index 3855f069627f..b9ecabff2032 100644 --- a/include/net/page_pool.h +++ b/include/net/page_pool.h @@ -33,6 +33,7 @@ #include <linux/mm.h> /* Needed by ptr_ring */ #include <linux/ptr_ring.h> #include <linux/dma-direction.h> +#include <linux/kabi.h>
#define PP_FLAG_DMA_MAP BIT(0) /* Should page_pool do the DMA * map/unmap @@ -132,6 +133,8 @@ struct page_pool { refcount_t user_cnt;
u64 destroy_cnt; + + KABI_RESERVE(1) };
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 4da61c950e93..907d51e677db 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 *); @@ -112,6 +113,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 9226a84dcc14..50dd8be91bf4 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; @@ -114,6 +115,8 @@ struct Qdisc { bool empty; struct rcu_head rcu;
+ KABI_RESERVE(1) + /* private data */ long privdata[] ____cacheline_aligned; }; @@ -271,6 +274,8 @@ struct Qdisc_class_ops { struct sk_buff *skb, struct tcmsg*); int (*dump_stats)(struct Qdisc *, unsigned long, struct gnet_dump *); + + KABI_RESERVE(1) };
/* Qdisc_class_ops flag values */ @@ -316,6 +321,8 @@ struct Qdisc_ops { u32 (*egress_block_get)(struct Qdisc *sch);
struct module *owner; + + KABI_RESERVE(1) };
diff --git a/include/net/sock.h b/include/net/sock.h index 6270d1d9436b..16b085f6c0bc 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -68,6 +68,7 @@ #include <net/tcp_states.h> #include <linux/net_tstamp.h> #include <net/l3mdev.h> +#include <linux/kabi.h>
/* * This structure really needs to be cleaned up. @@ -522,6 +523,15 @@ struct sock { struct bpf_local_storage __rcu *sk_bpf_storage; #endif struct rcu_head sk_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) };
enum sk_pacing { @@ -1235,6 +1245,15 @@ struct proto { atomic_t socks; #endif 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 8528015590e4..4855db6bce5e 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) @@ -87,6 +88,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 745b3bc6ce91..8e02a6ae247f 100644 --- a/include/net/tls.h +++ b/include/net/tls.h @@ -214,6 +214,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 { diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 6232a5f048bd..f2875c629d06 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -27,6 +27,7 @@ #include <net/gro_cells.h>
#include <linux/interrupt.h> +#include <linux/kabi.h>
#ifdef CONFIG_XFRM_STATISTICS #include <net/snmp.h> @@ -132,6 +133,11 @@ struct xfrm_state_offload { unsigned long offload_handle; unsigned int num_exthdrs; u8 flags; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
struct xfrm_mode {