From: Lu Jialin lujialin4@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4GII8?from=project-issue CVE: NA
--------
We reserve some fields beforehand for cpu cgroup and cpuset related structures prone to change, therefore, we can hot add/change features of cpu cgroup cpuset and cgroup with this enhancement.
After reserving, normally cache does not matter as the reserved fields are not accessed at all.
--------
Signed-off-by: Lu Jialin lujialin4@huawei.com Reviewed-by: Chen Hui judy.chenhui@huawei.com Reviewed-by: weiyang wang wangweiyang2@huawei.com Reviewed-by: Xiu Jianfeng xiujianfeng@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- kernel/cgroup/cpuset.c | 6 ++++++ kernel/sched/sched.h | 5 +++++ 2 files changed, 11 insertions(+)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index e575435811cf..4708c06eba0a 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -65,6 +65,7 @@ #include <linux/mutex.h> #include <linux/cgroup.h> #include <linux/wait.h> +#include <linux/kabi.h>
DEFINE_STATIC_KEY_FALSE(cpusets_pre_enable_key); DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key); @@ -160,6 +161,11 @@ struct cpuset { */ int use_parent_ecpus; int child_ecpus_count; + + KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
/* diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 4c58086cf080..ca7572c052f8 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -65,6 +65,7 @@ #include <linux/syscalls.h> #include <linux/task_work.h> #include <linux/tsacct_kern.h> +#include <linux/kabi.h>
#include <asm/tlb.h> #include <asm-generic/vmlinux.lds.h> @@ -440,6 +441,10 @@ struct task_group { struct uclamp_se uclamp[UCLAMP_CNT]; #endif
+ KABI_RESERVE(1) + KABI_RESERVE(2) + KABI_RESERVE(3) + KABI_RESERVE(4) };
#ifdef CONFIG_FAIR_GROUP_SCHED