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 can 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/can/core.h | 4 ++++ include/linux/can/dev.h | 6 ++++++ include/linux/can/rx-offload.h | 4 ++++ include/linux/can/skb.h | 1 + include/net/netns/can.h | 3 +++ 5 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 41ff31795320..ebac2eec365c 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h @@ -20,6 +20,7 @@ #include <linux/can/netlink.h> #include <linux/can/skb.h> #include <linux/netdevice.h> +#include <linux/kabi.h>
/* * CAN mode @@ -80,6 +81,11 @@ struct can_priv { struct led_trigger *rxtx_led_trig; char rxtx_led_trig_name[CAN_LED_NAME_SZ]; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#define CAN_SYNC_SEG 1 diff --git a/include/linux/can/rx-offload.h b/include/linux/can/rx-offload.h index f1b38088b765..03b4aa348e9b 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; @@ -28,6 +29,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/linux/can/skb.h b/include/linux/can/skb.h index ce7393d397e1..3323746ce2fd 100644 --- a/include/linux/can/skb.h +++ b/include/linux/can/skb.h @@ -34,6 +34,7 @@ struct can_skb_priv { int ifindex; int skbcnt; + struct can_frame cf[]; };
diff --git a/include/net/netns/can.h b/include/net/netns/can.h index 52fbd8291a96..e2783e3600fb 100644 --- a/include/net/netns/can.h +++ b/include/net/netns/can.h @@ -7,6 +7,7 @@ #define __NETNS_CAN_H__
#include <linux/spinlock.h> +#include <linux/kabi.h>
struct can_dev_rcv_lists; struct can_pkg_stats; @@ -35,6 +36,8 @@ struct netns_can {
/* CAN GW per-net gateway jobs */ struct hlist_head cgw_list; + + KABI_RESERVE(1) };
#endif /* __NETNS_CAN_H__ */