diff options
author | Min Le <lemin.lm@antgroup.com> | 2020-10-26 11:18:10 +0800 |
---|---|---|
committer | Min Le <lemin.lm@antgroup.com> | 2020-10-28 14:10:35 +0800 |
commit | c534c91b86b5190a367174db97c4a14fe0d0ffae (patch) | |
tree | aa03a98b90cb98322c93749eb44d2ca766ce8138 /pkg/sentry/platform | |
parent | 293877cf647ac3e900f0ae15061317a512bba7a0 (diff) |
arm64: need to restore the sentry's TLS when in EL1
Signed-off-by: Min Le <lemin.lm@antgroup.com>
Diffstat (limited to 'pkg/sentry/platform')
-rw-r--r-- | pkg/sentry/platform/ring0/entry_arm64.s | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/platform/ring0/entry_arm64.s b/pkg/sentry/platform/ring0/entry_arm64.s index 1079a024b..f9278b653 100644 --- a/pkg/sentry/platform/ring0/entry_arm64.s +++ b/pkg/sentry/platform/ring0/entry_arm64.s @@ -516,6 +516,10 @@ TEXT ·kernelExitToEl1(SB),NOSPLIT,$0 MOVD CPU_REGISTERS+PTRACE_PC(RSV_REG), R1 MSR R1, ELR_EL1 + // restore sentry's tls. + MOVD CPU_REGISTERS+PTRACE_TLS(RSV_REG), R1 + MSR R1, TPIDR_EL0 + MOVD CPU_REGISTERS+PTRACE_SP(RSV_REG), R1 MOVD R1, RSP |