diff options
author | Will Deacon <will@kernel.org> | 2020-05-15 14:11:05 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-05-18 17:47:22 +0100 |
commit | 51189c7a7ed1b4ed4493e27275d466ff60406d3a (patch) | |
tree | c06448db0ce33c2d4a5ae1494806a3b81082aa96 /arch/arm64/kernel/asm-offsets.c | |
parent | cc49c71d2abe99c1c2c9bedf0693ad2d3ee4a067 (diff) | |
download | linux-next-51189c7a7ed1b4ed4493e27275d466ff60406d3a.tar.gz |
arm64: scs: Store absolute SCS stack pointer value in thread_info
Storing the SCS information in thread_info as a {base,offset} pair
introduces an additional load instruction on the ret-to-user path,
since the SCS stack pointer in x18 has to be converted back to an offset
by subtracting the base.
Replace the offset with the absolute SCS stack pointer value instead
and avoid the redundant load.
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/asm-offsets.c')
-rw-r--r-- | arch/arm64/kernel/asm-offsets.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |