diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-05-27 17:51:40 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-27 17:51:40 +0000 |
commit | 84452958e1397b337a806f815e07ae69c4f4c896 (patch) | |
tree | 138422671bc14bd0c66f83c31be1a991888f3359 /pkg/sentry/platform/ring0 | |
parent | bae1520437ecbd3dd217880cb51eb24b59d26f51 (diff) | |
parent | 0bc022b7f3c13bb7c5c8d47d1781820161e7b1ad (diff) |
Merge release-20200518.0-45-g0bc022b7 (automated)
Diffstat (limited to 'pkg/sentry/platform/ring0')
34 files changed, 18 insertions, 2 deletions
diff --git a/pkg/sentry/platform/ring0/defs_impl_amd64.go b/pkg/sentry/platform/ring0/defs_impl_amd64.go index 029d699fe..50ac3040e 100755..100644 --- a/pkg/sentry/platform/ring0/defs_impl_amd64.go +++ b/pkg/sentry/platform/ring0/defs_impl_amd64.go @@ -1,11 +1,11 @@ package ring0 import ( - "gvisor.dev/gvisor/pkg/cpuid" - "gvisor.dev/gvisor/pkg/sentry/arch" "gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables" "fmt" + "gvisor.dev/gvisor/pkg/cpuid" + "gvisor.dev/gvisor/pkg/sentry/arch" "gvisor.dev/gvisor/pkg/usermem" "io" "reflect" diff --git a/pkg/sentry/platform/ring0/defs_impl_arm64.go b/pkg/sentry/platform/ring0/defs_impl_arm64.go index 93f23047d..93f23047d 100755..100644 --- a/pkg/sentry/platform/ring0/defs_impl_arm64.go +++ b/pkg/sentry/platform/ring0/defs_impl_arm64.go diff --git a/pkg/sentry/platform/ring0/entry_arm64.go b/pkg/sentry/platform/ring0/entry_arm64.go index 62a93f3d6..62a93f3d6 100755..100644 --- a/pkg/sentry/platform/ring0/entry_arm64.go +++ b/pkg/sentry/platform/ring0/entry_arm64.go diff --git a/pkg/sentry/platform/ring0/entry_impl_amd64.s b/pkg/sentry/platform/ring0/entry_impl_amd64.s index daba45f9d..daba45f9d 100755..100644 --- a/pkg/sentry/platform/ring0/entry_impl_amd64.s +++ b/pkg/sentry/platform/ring0/entry_impl_amd64.s diff --git a/pkg/sentry/platform/ring0/entry_impl_arm64.s b/pkg/sentry/platform/ring0/entry_impl_arm64.s index ea202219a..ea202219a 100755..100644 --- a/pkg/sentry/platform/ring0/entry_impl_arm64.s +++ b/pkg/sentry/platform/ring0/entry_impl_arm64.s diff --git a/pkg/sentry/platform/ring0/kernel_arm64.go b/pkg/sentry/platform/ring0/kernel_arm64.go index ccacaea6b..ccacaea6b 100755..100644 --- a/pkg/sentry/platform/ring0/kernel_arm64.go +++ b/pkg/sentry/platform/ring0/kernel_arm64.go diff --git a/pkg/sentry/platform/ring0/lib_arm64.go b/pkg/sentry/platform/ring0/lib_arm64.go index 444a83913..a6345010d 100755..100644 --- a/pkg/sentry/platform/ring0/lib_arm64.go +++ b/pkg/sentry/platform/ring0/lib_arm64.go @@ -38,6 +38,12 @@ func SaveVRegs(*byte) // LoadVRegs loads V0-V31 registers. func LoadVRegs(*byte) +// GetTLS returns the value of TPIDR_EL0 register. +func GetTLS() (value uint64) + +// SetTLS writes the TPIDR_EL0 value. +func SetTLS(value uint64) + // Init sets function pointers based on architectural features. // // This must be called prior to using ring0. diff --git a/pkg/sentry/platform/ring0/lib_arm64.s b/pkg/sentry/platform/ring0/lib_arm64.s index 0e6a6235b..b63e14b41 100755..100644 --- a/pkg/sentry/platform/ring0/lib_arm64.s +++ b/pkg/sentry/platform/ring0/lib_arm64.s @@ -15,6 +15,16 @@ #include "funcdata.h" #include "textflag.h" +TEXT ·GetTLS(SB),NOSPLIT,$0-8 + MRS TPIDR_EL0, R1 + MOVD R1, ret+0(FP) + RET + +TEXT ·SetTLS(SB),NOSPLIT,$0-8 + MOVD addr+0(FP), R1 + MSR R1, TPIDR_EL0 + RET + TEXT ·CPACREL1(SB),NOSPLIT,$0-8 WORD $0xd5381041 // MRS CPACR_EL1, R1 MOVD R1, ret+0(FP) diff --git a/pkg/sentry/platform/ring0/lib_arm64_unsafe.go b/pkg/sentry/platform/ring0/lib_arm64_unsafe.go index c05166fea..c05166fea 100755..100644 --- a/pkg/sentry/platform/ring0/lib_arm64_unsafe.go +++ b/pkg/sentry/platform/ring0/lib_arm64_unsafe.go diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go b/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go index 78510ebed..78510ebed 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64_state_autogen.go b/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64_state_autogen.go index a24523f87..a24523f87 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64_state_autogen.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64_state_autogen.go diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_amd64_state_autogen.go b/pkg/sentry/platform/ring0/pagetables/pagetables_amd64_state_autogen.go index f48a8acd1..f48a8acd1 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_amd64_state_autogen.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_amd64_state_autogen.go diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_arm64.go b/pkg/sentry/platform/ring0/pagetables/pagetables_arm64.go index 1a49f12a2..1a49f12a2 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_arm64.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_arm64.go diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_arm64_state_autogen.go b/pkg/sentry/platform/ring0/pagetables/pagetables_arm64_state_autogen.go index ae9d2b272..ae9d2b272 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_arm64_state_autogen.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_arm64_state_autogen.go diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_state_autogen.go b/pkg/sentry/platform/ring0/pagetables/pagetables_state_autogen.go index 4c4540603..4c4540603 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_state_autogen.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_state_autogen.go diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_unsafe_state_autogen.go b/pkg/sentry/platform/ring0/pagetables/pagetables_unsafe_state_autogen.go index 4c4540603..4c4540603 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_unsafe_state_autogen.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_unsafe_state_autogen.go diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_x86_state_autogen.go b/pkg/sentry/platform/ring0/pagetables/pagetables_x86_state_autogen.go index 6fe78c51c..6fe78c51c 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_x86_state_autogen.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_x86_state_autogen.go diff --git a/pkg/sentry/platform/ring0/pagetables/pcids.go b/pkg/sentry/platform/ring0/pagetables/pcids.go index 964496aac..964496aac 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pcids.go +++ b/pkg/sentry/platform/ring0/pagetables/pcids.go diff --git a/pkg/sentry/platform/ring0/pagetables/pcids_aarch64.go b/pkg/sentry/platform/ring0/pagetables/pcids_aarch64.go index fbfd41d83..fbfd41d83 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pcids_aarch64.go +++ b/pkg/sentry/platform/ring0/pagetables/pcids_aarch64.go diff --git a/pkg/sentry/platform/ring0/pagetables/pcids_aarch64.s b/pkg/sentry/platform/ring0/pagetables/pcids_aarch64.s index e9d62d768..e9d62d768 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pcids_aarch64.s +++ b/pkg/sentry/platform/ring0/pagetables/pcids_aarch64.s diff --git a/pkg/sentry/platform/ring0/pagetables/pcids_x86.go b/pkg/sentry/platform/ring0/pagetables/pcids_x86.go index 91fc5e8dd..91fc5e8dd 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/pcids_x86.go +++ b/pkg/sentry/platform/ring0/pagetables/pcids_x86.go diff --git a/pkg/sentry/platform/ring0/pagetables/walker_amd64.go b/pkg/sentry/platform/ring0/pagetables/walker_amd64.go index 8f9dacd93..8f9dacd93 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/walker_amd64.go +++ b/pkg/sentry/platform/ring0/pagetables/walker_amd64.go diff --git a/pkg/sentry/platform/ring0/pagetables/walker_arm64.go b/pkg/sentry/platform/ring0/pagetables/walker_arm64.go index c261d393a..c261d393a 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/walker_arm64.go +++ b/pkg/sentry/platform/ring0/pagetables/walker_arm64.go diff --git a/pkg/sentry/platform/ring0/pagetables/walker_empty.go b/pkg/sentry/platform/ring0/pagetables/walker_empty.go index 417784e17..417784e17 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/walker_empty.go +++ b/pkg/sentry/platform/ring0/pagetables/walker_empty.go diff --git a/pkg/sentry/platform/ring0/pagetables/walker_lookup.go b/pkg/sentry/platform/ring0/pagetables/walker_lookup.go index 906c9c50f..906c9c50f 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/walker_lookup.go +++ b/pkg/sentry/platform/ring0/pagetables/walker_lookup.go diff --git a/pkg/sentry/platform/ring0/pagetables/walker_map.go b/pkg/sentry/platform/ring0/pagetables/walker_map.go index 61ee3c825..61ee3c825 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/walker_map.go +++ b/pkg/sentry/platform/ring0/pagetables/walker_map.go diff --git a/pkg/sentry/platform/ring0/pagetables/walker_unmap.go b/pkg/sentry/platform/ring0/pagetables/walker_unmap.go index be2aa0ce4..be2aa0ce4 100755..100644 --- a/pkg/sentry/platform/ring0/pagetables/walker_unmap.go +++ b/pkg/sentry/platform/ring0/pagetables/walker_unmap.go diff --git a/pkg/sentry/platform/ring0/ring0_amd64_state_autogen.go b/pkg/sentry/platform/ring0/ring0_amd64_state_autogen.go index 96cf5d331..96cf5d331 100755..100644 --- a/pkg/sentry/platform/ring0/ring0_amd64_state_autogen.go +++ b/pkg/sentry/platform/ring0/ring0_amd64_state_autogen.go diff --git a/pkg/sentry/platform/ring0/ring0_arm64_state_autogen.go b/pkg/sentry/platform/ring0/ring0_arm64_state_autogen.go index 7f2ab3537..7f2ab3537 100755..100644 --- a/pkg/sentry/platform/ring0/ring0_arm64_state_autogen.go +++ b/pkg/sentry/platform/ring0/ring0_arm64_state_autogen.go diff --git a/pkg/sentry/platform/ring0/ring0_arm64_unsafe_state_autogen.go b/pkg/sentry/platform/ring0/ring0_arm64_unsafe_state_autogen.go index fa617c57e..fa617c57e 100755..100644 --- a/pkg/sentry/platform/ring0/ring0_arm64_unsafe_state_autogen.go +++ b/pkg/sentry/platform/ring0/ring0_arm64_unsafe_state_autogen.go diff --git a/pkg/sentry/platform/ring0/ring0_impl_amd64_state_autogen.go b/pkg/sentry/platform/ring0/ring0_impl_amd64_state_autogen.go index 327aba163..327aba163 100755..100644 --- a/pkg/sentry/platform/ring0/ring0_impl_amd64_state_autogen.go +++ b/pkg/sentry/platform/ring0/ring0_impl_amd64_state_autogen.go diff --git a/pkg/sentry/platform/ring0/ring0_impl_arm64_state_autogen.go b/pkg/sentry/platform/ring0/ring0_impl_arm64_state_autogen.go index 327aba163..327aba163 100755..100644 --- a/pkg/sentry/platform/ring0/ring0_impl_arm64_state_autogen.go +++ b/pkg/sentry/platform/ring0/ring0_impl_arm64_state_autogen.go diff --git a/pkg/sentry/platform/ring0/ring0_state_autogen.go b/pkg/sentry/platform/ring0/ring0_state_autogen.go index 327aba163..327aba163 100755..100644 --- a/pkg/sentry/platform/ring0/ring0_state_autogen.go +++ b/pkg/sentry/platform/ring0/ring0_state_autogen.go diff --git a/pkg/sentry/platform/ring0/ring0_unsafe_state_autogen.go b/pkg/sentry/platform/ring0/ring0_unsafe_state_autogen.go index 327aba163..327aba163 100755..100644 --- a/pkg/sentry/platform/ring0/ring0_unsafe_state_autogen.go +++ b/pkg/sentry/platform/ring0/ring0_unsafe_state_autogen.go |