Commit f13098db authored by Wang Hai's avatar Wang Hai Committed by Zheng Zengkai
Browse files

kabi: net: reserve space for net base subsystem related structure

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: default avatarWang Hai <wanghai38@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 75711e28
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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)
};

/**
+6 −0
Original line number Diff line number Diff line
@@ -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 {
+6 −0
Original line number Diff line number Diff line
@@ -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);
+6 −0
Original line number Diff line number Diff line
@@ -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 {
+6 −0
Original line number Diff line number Diff line
@@ -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)	\
Loading