aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/include/asm/scs.h9
-rw-r--r--arch/arm64/include/asm/thread_info.h4
-rw-r--r--arch/arm64/kernel/asm-offsets.c2
3 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm64/include/asm/scs.h b/arch/arm64/include/asm/scs.h
index 96549353b0cb..6b8cf4352fe3 100644
--- a/arch/arm64/include/asm/scs.h
+++ b/arch/arm64/include/asm/scs.h
@@ -4,16 +4,15 @@
#ifdef __ASSEMBLY__
+#include <asm/asm-offsets.h>
+
#ifdef CONFIG_SHADOW_CALL_STACK
.macro scs_load tsk, tmp
- ldp x18, \tmp, [\tsk, #TSK_TI_SCS_BASE]
- add x18, x18, \tmp
+ ldr x18, [\tsk, #TSK_TI_SCS_SP]
.endm
.macro scs_save tsk, tmp
- ldr \tmp, [\tsk, #TSK_TI_SCS_BASE]
- sub \tmp, x18, \tmp
- str \tmp, [\tsk, #TSK_TI_SCS_OFFSET]
+ str x18, [\tsk, #TSK_TI_SCS_SP]
.endm
#else
.macro scs_load tsk, tmp
diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h
index 9df79c0a4c43..6ea8b6a26ae9 100644
--- a/arch/arm64/include/asm/thread_info.h
+++ b/arch/arm64/include/asm/thread_info.h
@@ -43,7 +43,7 @@ struct thread_info {
};
#ifdef CONFIG_SHADOW_CALL_STACK
void *scs_base;
- unsigned long scs_offset;
+ void *scs_sp;
#endif
};
@@ -107,7 +107,7 @@ void arch_release_task_struct(struct task_struct *tsk);
#ifdef CONFIG_SHADOW_CALL_STACK
#define INIT_SCS \
.scs_base = init_shadow_call_stack, \
- .scs_offset = 0,
+ .scs_sp = init_shadow_call_stack,
#else
#define INIT_SCS
#endif
diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c
index d7934250b68c..a098a45f63d8 100644
--- a/arch/arm64/kernel/asm-offsets.c
+++ b/arch/arm64/kernel/asm-offsets.c
@@ -36,7 +36,7 @@ int main(void)
#endif
#ifdef CONFIG_SHADOW_CALL_STACK
DEFINE(TSK_TI_SCS_BASE, offsetof(struct task_struct, thread_info.scs_base));
- DEFINE(TSK_TI_SCS_OFFSET, offsetof(struct task_struct, thread_info.scs_offset));
+ DEFINE(TSK_TI_SCS_SP, offsetof(struct task_struct, thread_info.scs_sp));
#endif
DEFINE(TSK_STACK, offsetof(struct task_struct, stack));
#ifdef CONFIG_STACKPROTECTOR