提交 a0bc5506 编写于 作者: W Wang ShaoBo 提交者: Zheng Zengkai

kabi: reserve space for kobject related structures

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4KFY7?from=project-issue
CVE: NA

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

Reserve space for the structures in kobject subsystem.
Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: NCheng Jian <cj.chengjian@huawei.com>
Reviewed-by: NCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 a8dcc232
......@@ -15,6 +15,7 @@
#ifndef _KOBJECT_H_
#define _KOBJECT_H_
#include <linux/kabi.h>
#include <linux/types.h>
#include <linux/list.h>
#include <linux/sysfs.h>
......@@ -77,6 +78,10 @@ struct kobject {
unsigned int state_add_uevent_sent:1;
unsigned int state_remove_uevent_sent:1;
unsigned int uevent_suppress:1;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
extern __printf(2, 3)
......@@ -143,6 +148,10 @@ struct kobj_type {
const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj);
const void *(*namespace)(struct kobject *kobj);
void (*get_ownership)(struct kobject *kobj, kuid_t *uid, kgid_t *gid);
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
struct kobj_uevent_env {
......@@ -194,6 +203,10 @@ struct kset {
spinlock_t list_lock;
struct kobject kobj;
const struct kset_uevent_ops *uevent_ops;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
} __randomize_layout;
extern void kset_init(struct kset *kset);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册