提交 e202760d 编写于 作者: T Tan Xiaojun 提交者: Xie XiuQi

kabi: reserve space for schedule subsystem related structure

hulk inclusion
category: feature
bugzilla: 13276
CVE: NA

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

Reserve space for the structure in schedule subsystem.
Signed-off-by: NTan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 0a7866f7
...@@ -478,6 +478,11 @@ struct sched_entity { ...@@ -478,6 +478,11 @@ struct sched_entity {
*/ */
struct sched_avg avg; struct sched_avg avg;
#endif #endif
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
struct sched_rt_entity { struct sched_rt_entity {
...@@ -1199,6 +1204,15 @@ struct task_struct { ...@@ -1199,6 +1204,15 @@ struct task_struct {
*/ */
randomized_struct_fields_end randomized_struct_fields_end
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
KABI_RESERVE(5)
KABI_RESERVE(6)
KABI_RESERVE(7)
KABI_RESERVE(8)
/* CPU-specific state of this task: */ /* CPU-specific state of this task: */
struct thread_struct thread; struct thread_struct thread;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#ifndef _LINUX_SCHED_SIGNAL_H #ifndef _LINUX_SCHED_SIGNAL_H
#define _LINUX_SCHED_SIGNAL_H #define _LINUX_SCHED_SIGNAL_H
#include <linux/kabi.h>
#include <linux/rculist.h> #include <linux/rculist.h>
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -232,6 +233,11 @@ struct signal_struct { ...@@ -232,6 +233,11 @@ struct signal_struct {
struct mutex cred_guard_mutex; /* guard against foreign influences on struct mutex cred_guard_mutex; /* guard against foreign influences on
* credential calculations * credential calculations
* (notably. ptrace) */ * (notably. ptrace) */
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
} __randomize_layout; } __randomize_layout;
/* /*
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#ifndef _LINUX_SCHED_USER_H #ifndef _LINUX_SCHED_USER_H
#define _LINUX_SCHED_USER_H #define _LINUX_SCHED_USER_H
#include <linux/kabi.h>
#include <linux/uidgid.h> #include <linux/uidgid.h>
#include <linux/atomic.h> #include <linux/atomic.h>
#include <linux/refcount.h> #include <linux/refcount.h>
...@@ -46,6 +47,9 @@ struct user_struct { ...@@ -46,6 +47,9 @@ struct user_struct {
/* Miscellaneous per-user rate limit */ /* Miscellaneous per-user rate limit */
struct ratelimit_state ratelimit; struct ratelimit_state ratelimit;
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
extern int uids_sysfs_init(void); extern int uids_sysfs_init(void);
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <linux/task_work.h> #include <linux/task_work.h>
#include <linux/tsacct_kern.h> #include <linux/tsacct_kern.h>
#include <linux/kabi.h>
#include <asm/tlb.h> #include <asm/tlb.h>
...@@ -392,6 +393,9 @@ struct task_group { ...@@ -392,6 +393,9 @@ struct task_group {
#endif #endif
struct cfs_bandwidth cfs_bandwidth; struct cfs_bandwidth cfs_bandwidth;
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
#ifdef CONFIG_FAIR_GROUP_SCHED #ifdef CONFIG_FAIR_GROUP_SCHED
...@@ -567,6 +571,9 @@ struct cfs_rq { ...@@ -567,6 +571,9 @@ struct cfs_rq {
struct list_head throttled_list; struct list_head throttled_list;
#endif /* CONFIG_CFS_BANDWIDTH */ #endif /* CONFIG_CFS_BANDWIDTH */
#endif /* CONFIG_FAIR_GROUP_SCHED */ #endif /* CONFIG_FAIR_GROUP_SCHED */
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
static inline int rt_bandwidth_enabled(void) static inline int rt_bandwidth_enabled(void)
...@@ -751,6 +758,11 @@ struct root_domain { ...@@ -751,6 +758,11 @@ struct root_domain {
struct cpupri cpupri; struct cpupri cpupri;
unsigned long max_cpu_capacity; unsigned long max_cpu_capacity;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
}; };
extern struct root_domain def_root_domain; extern struct root_domain def_root_domain;
...@@ -917,6 +929,9 @@ struct rq { ...@@ -917,6 +929,9 @@ struct rq {
/* Must be inspected within a rcu lock section */ /* Must be inspected within a rcu lock section */
struct cpuidle_state *idle_state; struct cpuidle_state *idle_state;
#endif #endif
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
struct cputime { struct cputime {
...@@ -1227,6 +1242,9 @@ struct sched_group { ...@@ -1227,6 +1242,9 @@ struct sched_group {
struct sched_group_capacity *sgc; struct sched_group_capacity *sgc;
int asym_prefer_cpu; /* CPU of highest priority in group */ int asym_prefer_cpu; /* CPU of highest priority in group */
KABI_RESERVE(1)
KABI_RESERVE(2)
/* /*
* The CPUs this group covers. * The CPUs this group covers.
* *
...@@ -1575,6 +1593,9 @@ struct sched_class { ...@@ -1575,6 +1593,9 @@ struct sched_class {
#ifdef CONFIG_FAIR_GROUP_SCHED #ifdef CONFIG_FAIR_GROUP_SCHED
void (*task_change_group)(struct task_struct *p, int type); void (*task_change_group)(struct task_struct *p, int type);
#endif #endif
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
static inline void put_prev_task(struct rq *rq, struct task_struct *prev) static inline void put_prev_task(struct rq *rq, struct task_struct *prev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册