hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I908BZ CVE: NA
-------------------------------
Reserve space for the structures in kobject subsystem.
Signed-off-by: Yu Liao liaoyu15@huawei.com --- include/linux/kobject.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index c30affcc43b4..7b7c4a0e7838 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -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> @@ -79,6 +80,11 @@ struct kobject { #ifdef CONFIG_DEBUG_KOBJECT_RELEASE struct delayed_work release; #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
__printf(2, 3) int kobject_set_name(struct kobject *kobj, const char *name, ...); @@ -120,6 +126,11 @@ struct kobj_type { const struct kobj_ns_type_operations *(*child_ns_type)(const struct kobject *kobj); const void *(*namespace)(const struct kobject *kobj); void (*get_ownership)(const 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 { @@ -170,6 +181,11 @@ 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;
void kset_init(struct kset *kset);