Commit e8baff77 authored by Guan Jing's avatar Guan Jing Committed by Zheng Zengkai
Browse files

KABI: add reserve space for thread_info struct

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


CVE: NA

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

We reserve some fields beforehand for thread_info prone to change.

Signed-off-by: default avatarGuan Jing <guanjing6@huawei.com>
Reviewed-by: default avatarChen Hui <judy.chenhui@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 4d13e400
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <linux/compiler.h>
#include <asm/fpstate.h>
#include <asm/page.h>
#include <linux/kabi.h>

#ifdef CONFIG_KASAN
/*
@@ -73,6 +74,8 @@ struct thread_info {
#ifdef CONFIG_ARM_THUMBEE
	unsigned long		thumbee_state;	/* ThumbEE Handler Base register */
#endif
	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

#define INIT_THREAD_INFO(tsk)						\
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ struct task_struct;
#include <asm/memory.h>
#include <asm/stack_pointer.h>
#include <asm/types.h>
#include <linux/kabi.h>

typedef unsigned long mm_segment_t;

@@ -46,6 +47,9 @@ struct thread_info {
	void			*scs_sp;
#endif
	u32			cpu;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

#define thread_saved_pc(tsk)	\
+3 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include <asm/page.h>
#include <asm/percpu.h>
#include <asm/types.h>
#include <linux/kabi.h>

/*
 * TOP_OF_KERNEL_STACK_PADDING is a number of unused bytes that we
@@ -59,6 +60,8 @@ struct thread_info {
#ifdef CONFIG_SMP
	u32			cpu;		/* current CPU */
#endif
	KABI_RESERVE(1)
	KABI_RESERVE(2)
};

#define INIT_THREAD_INFO(tsk)			\