Merge 9134b5a464
("arm64: Always load shadow stack pointer directly from the task struct") into android12-5.10-lts
Steps on the way to 5.10.180 Change-Id: Ic2b3ad3de8e6177fda3a6ef1798bf7f289137fd6 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
d9baf420d0
@ -9,15 +9,16 @@
|
||||
#ifdef CONFIG_SHADOW_CALL_STACK
|
||||
scs_sp .req x18
|
||||
|
||||
.macro scs_load tsk, tmp
|
||||
ldr scs_sp, [\tsk, #TSK_TI_SCS_SP]
|
||||
.macro scs_load_current
|
||||
get_current_task scs_sp
|
||||
ldr scs_sp, [scs_sp, #TSK_TI_SCS_SP]
|
||||
.endm
|
||||
|
||||
.macro scs_save tsk, tmp
|
||||
str scs_sp, [\tsk, #TSK_TI_SCS_SP]
|
||||
.endm
|
||||
#else
|
||||
.macro scs_load tsk, tmp
|
||||
.macro scs_load_current
|
||||
.endm
|
||||
|
||||
.macro scs_save tsk, tmp
|
||||
|
@ -297,7 +297,7 @@ alternative_if ARM64_HAS_ADDRESS_AUTH
|
||||
alternative_else_nop_endif
|
||||
1:
|
||||
|
||||
scs_load tsk, x20
|
||||
scs_load_current
|
||||
.else
|
||||
add x21, sp, #S_FRAME_SIZE
|
||||
get_current_task tsk
|
||||
@ -1122,7 +1122,7 @@ SYM_FUNC_START(cpu_switch_to)
|
||||
msr sp_el0, x1
|
||||
ptrauth_keys_install_kernel x1, x8, x9, x10
|
||||
scs_save x0, x8
|
||||
scs_load x1, x8
|
||||
scs_load_current
|
||||
ret
|
||||
SYM_FUNC_END(cpu_switch_to)
|
||||
NOKPROBE(cpu_switch_to)
|
||||
|
@ -621,7 +621,7 @@ SYM_FUNC_START_LOCAL(__secondary_switched)
|
||||
ldr x2, [x0, #CPU_BOOT_TASK]
|
||||
cbz x2, __secondary_too_slow
|
||||
msr sp_el0, x2
|
||||
scs_load x2, x3
|
||||
scs_load_current
|
||||
mov x29, #0
|
||||
mov x30, #0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user