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); };