diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-03-11 08:09:01 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-03-11 08:09:01 +0000 |
commit | 1041d6c67e6406e5a9780934a1c3e6786f214cb6 (patch) | |
tree | e3724b837cbb8ff40fdc65b1c827b24c9dfb269d /pkg/sentry/arch/arch_arm64.go | |
parent | c0100acc5d77703465a0ccb4a9edf6c5ecd482af (diff) | |
parent | 24e7005ab6bd025f79da46883bd31151fab72147 (diff) |
Merge release-20200219.0-136-g24e7005 (automated)
Diffstat (limited to 'pkg/sentry/arch/arch_arm64.go')
-rwxr-xr-x | pkg/sentry/arch/arch_arm64.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pkg/sentry/arch/arch_arm64.go b/pkg/sentry/arch/arch_arm64.go index 885115ae2..db99c5acb 100755 --- a/pkg/sentry/arch/arch_arm64.go +++ b/pkg/sentry/arch/arch_arm64.go @@ -140,16 +140,17 @@ func (c *context64) SetStack(value uintptr) { // TLS returns the current TLS pointer. func (c *context64) TLS() uintptr { - // TODO(gvisor.dev/issue/1238): TLS is not supported. - // MRS_TPIDR_EL0 - return 0 + return uintptr(c.TPValue) } // SetTLS sets the current TLS pointer. Returns false if value is invalid. func (c *context64) SetTLS(value uintptr) bool { - // TODO(gvisor.dev/issue/1238): TLS is not supported. - // MSR_TPIDR_EL0 - return false + if value >= uintptr(maxAddr64) { + return false + } + + c.TPValue = uint64(value) + return true } // SetOldRSeqInterruptedIP implements Context.SetOldRSeqInterruptedIP. |