mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
ANDROID: GKI: networking: add Android ABI padding to a lot of networking structures
Try to mitigate potential future driver core api changes by adding a padding to a lot of different networking structures: struct ipv6_devconf struct proto_ops struct header_ops struct napi_struct struct netdev_queue struct netdev_rx_queue struct xfrmdev_ops struct net_device_ops struct net_device struct packet_type struct sk_buff struct tlsdev_ops Based on a change made to the RHEL/CENTOS 8 kernel. Bug: 151154716 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I590f004754dbc8beafa40e71cac70a0938c38b4a
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#define _IPV6_H
|
||||
|
||||
#include <uapi/linux/ipv6.h>
|
||||
#include <linux/android_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 ndisc_tclass;
|
||||
|
||||
struct ctl_table_header *sysctl_header;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
};
|
||||
|
||||
struct ipv6_params {
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/once.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/android_kabi.h>
|
||||
|
||||
#include <uapi/linux/net.h>
|
||||
|
||||
@@ -198,6 +199,11 @@ struct proto_ops {
|
||||
int (*sendmsg_locked)(struct sock *sk, struct msghdr *msg,
|
||||
size_t size);
|
||||
int (*set_rcvlowat)(struct sock *sk, int val);
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
};
|
||||
|
||||
#define DECLARE_SOCKADDR(type, dst, src) \
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <uapi/linux/if_bonding.h>
|
||||
#include <uapi/linux/pkt_cls.h>
|
||||
#include <linux/hashtable.h>
|
||||
#include <linux/android_kabi.h>
|
||||
|
||||
struct netpoll_info;
|
||||
struct device;
|
||||
@@ -274,6 +275,9 @@ struct header_ops {
|
||||
const struct net_device *dev,
|
||||
const unsigned char *haddr);
|
||||
bool (*validate)(const char *ll_header, unsigned int len);
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
};
|
||||
|
||||
/* These flag bits are private to the generic network queueing
|
||||
@@ -339,6 +343,11 @@ struct napi_struct {
|
||||
struct list_head dev_list;
|
||||
struct hlist_node napi_hash_node;
|
||||
unsigned int napi_id;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -598,6 +607,11 @@ struct netdev_queue {
|
||||
#ifdef CONFIG_BQL
|
||||
struct dql dql;
|
||||
#endif
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
} ____cacheline_aligned_in_smp;
|
||||
|
||||
extern int sysctl_fb_tunnels_only_for_init_net;
|
||||
@@ -712,6 +726,11 @@ struct netdev_rx_queue {
|
||||
struct kobject kobj;
|
||||
struct net_device *dev;
|
||||
struct xdp_rxq_info xdp_rxq;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
} ____cacheline_aligned_in_smp;
|
||||
|
||||
/*
|
||||
@@ -888,6 +907,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);
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -910,6 +934,10 @@ struct tlsdev_ops {
|
||||
enum tls_offload_ctx_dir direction);
|
||||
void (*tls_dev_resync_rx)(struct net_device *netdev,
|
||||
struct sock *sk, u32 seq, u64 rcd_sn);
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1410,6 +1438,15 @@ struct net_device_ops {
|
||||
u32 flags);
|
||||
int (*ndo_xsk_async_xmit)(struct net_device *dev,
|
||||
u32 queue_id);
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
ANDROID_KABI_RESERVE(5);
|
||||
ANDROID_KABI_RESERVE(6);
|
||||
ANDROID_KABI_RESERVE(7);
|
||||
ANDROID_KABI_RESERVE(8);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2032,6 +2069,16 @@ struct net_device {
|
||||
struct lock_class_key *qdisc_running_key;
|
||||
bool proto_down;
|
||||
unsigned wol_enabled:1;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
ANDROID_KABI_RESERVE(5);
|
||||
ANDROID_KABI_RESERVE(6);
|
||||
ANDROID_KABI_RESERVE(7);
|
||||
ANDROID_KABI_RESERVE(8);
|
||||
|
||||
};
|
||||
#define to_net_dev(d) container_of(d, struct net_device, dev)
|
||||
|
||||
@@ -2347,6 +2394,11 @@ struct packet_type {
|
||||
struct sock *sk);
|
||||
void *af_packet_priv;
|
||||
struct list_head list;
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
ANDROID_KABI_RESERVE(3);
|
||||
ANDROID_KABI_RESERVE(4);
|
||||
};
|
||||
|
||||
struct offload_callbacks {
|
||||
|
||||
@@ -249,6 +249,7 @@ struct nf_conntrack {
|
||||
atomic_t use;
|
||||
};
|
||||
#endif
|
||||
#include <linux/android_kabi.h>
|
||||
|
||||
struct nf_bridge_info {
|
||||
refcount_t use;
|
||||
@@ -845,6 +846,9 @@ struct sk_buff {
|
||||
__u32 headers_end[0];
|
||||
/* public: */
|
||||
|
||||
ANDROID_KABI_RESERVE(1);
|
||||
ANDROID_KABI_RESERVE(2);
|
||||
|
||||
/* These elements must be at the end, see alloc_skb() for details. */
|
||||
sk_buff_data_t tail;
|
||||
sk_buff_data_t end;
|
||||
|
||||
Reference in New Issue
Block a user