提交 a62969d3 编写于 作者: Z Zheng Zengkai

KABI: Add KABI_AUX_PTR extenstions to some more base structures

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4JBL0
CVE: NA

------------------------------

Add KABI_AUX_PTR extenstions to the following base structures
before KABI freeze:

struct device_driver
struct class
struct device
struct hrtimer
struct ipmi_smi_handlers
struct net_device
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e146a64e
......@@ -370,6 +370,12 @@ struct dev_links_info {
enum dl_dev_state status;
};
/**
* struct device_extended_resvd - KABI extension struct
*/
struct device_extended_resvd {
};
/**
* struct device - The basic device structure
* @parent: The device's "parent" device, the device to which it is attached.
......@@ -560,7 +566,7 @@ struct device {
#ifdef CONFIG_DMA_OPS_BYPASS
bool dma_ops_bypass : 1;
#endif
/* Use device_extended after all RESERVE fields used */
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
......@@ -577,6 +583,7 @@ struct device {
KABI_RESERVE(14)
KABI_RESERVE(15)
KABI_RESERVE(16)
KABI_AUX_PTR(device_extended)
};
/**
......
......@@ -24,6 +24,12 @@
struct device;
struct fwnode_handle;
/**
* struct class_resvd - KABI extension struct
*/
struct class_resvd {
};
/**
* struct class - device classes
* @name: Name of the class.
......@@ -82,6 +88,7 @@ struct class {
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
KABI_AUX_PTR(class)
};
struct class_dev_iter {
......
......@@ -48,6 +48,12 @@ enum probe_type {
PROBE_FORCE_SYNCHRONOUS,
};
/**
* struct device_driver_resvd - KABI extension struct
*/
struct device_driver_resvd {
};
/**
* struct device_driver - The basic device driver structure
* @name: Name of the device driver.
......@@ -124,6 +130,7 @@ struct device_driver {
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
KABI_AUX_PTR(device_driver)
};
......
......@@ -95,6 +95,12 @@ enum hrtimer_restart {
#define HRTIMER_STATE_INACTIVE 0x00
#define HRTIMER_STATE_ENQUEUED 0x01
/**
* struct hrtimer_resvd - KABI extension struct
*/
struct hrtimer_resvd {
};
/**
* struct hrtimer - the basic hrtimer structure
* @node: timerqueue node, which also manages node.expires,
......@@ -128,6 +134,7 @@ struct hrtimer {
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_AUX_PTR(hrtimer)
};
/**
......
......@@ -70,6 +70,15 @@ struct ipmi_smi_msg {
void (*done)(struct ipmi_smi_msg *msg);
};
/**
* struct ipmi_smi_handlers_resvd - KABI extension struct
* This extension must be dynamically allocated for every instance of
* ipmi_smi_handlers, because ipmi_smi_handlers is embedded in another
* struct.
*/
struct ipmi_smi_handlers_resvd {
};
struct ipmi_smi_handlers {
struct module *owner;
......@@ -153,6 +162,7 @@ struct ipmi_smi_handlers {
* block.
*/
void (*set_maintenance_mode)(void *send_info, bool enable);
KABI_AUX_PTR(ipmi_smi_handlers)
};
struct ipmi_device_id {
......
......@@ -1639,6 +1639,12 @@ enum netdev_ml_priv_type {
ML_PRIV_CAN,
};
/**
* struct net_device_extended_resvd - KABI extension struct
*/
struct net_device_extended_resvd {
};
/**
* struct net_device - The DEVICE structure.
*
......@@ -2215,6 +2221,7 @@ struct net_device {
KABI_RESERVE(6)
KABI_RESERVE(7)
KABI_RESERVE(8)
KABI_AUX_PTR(net_device_extended)
};
#define to_net_dev(d) container_of(d, struct net_device, dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册