diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-12-15 11:54:04 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-15 11:54:04 -0800 |
commit | 5843a5007c79268ba9913a8e0dd3ec998a741d11 (patch) | |
tree | 11605755acad39e62ac2a01daefce8a798f1e8dd /pkg/sentry/platform/ring0 | |
parent | b15acae9a6e20a09a97b5fdfee5850469ff3b0ea (diff) | |
parent | d0f8b3174e01cc14939d8f631e4415cf30925208 (diff) |
Merge pull request #4722 from zhlhahaha:2010
PiperOrigin-RevId: 347660920
Diffstat (limited to 'pkg/sentry/platform/ring0')
-rw-r--r-- | pkg/sentry/platform/ring0/kernel_arm64.go | 6 | ||||
-rw-r--r-- | pkg/sentry/platform/ring0/lib_arm64.go | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/pkg/sentry/platform/ring0/kernel_arm64.go b/pkg/sentry/platform/ring0/kernel_arm64.go index 90a7b8392..bffe27e5c 100644 --- a/pkg/sentry/platform/ring0/kernel_arm64.go +++ b/pkg/sentry/platform/ring0/kernel_arm64.go @@ -53,6 +53,12 @@ func IsCanonical(addr uint64) bool { return addr <= 0x0000ffffffffffff || addr > 0xffff000000000000 } +// SwitchToUser performs an eret. +// +// The return value is the exception vector. +// +// +checkescape:all +// //go:nosplit func (c *CPU) SwitchToUser(switchOpts SwitchOpts) (vector Vector) { storeAppASID(uintptr(switchOpts.UserASID)) diff --git a/pkg/sentry/platform/ring0/lib_arm64.go b/pkg/sentry/platform/ring0/lib_arm64.go index ef0d8974d..29b3efd34 100644 --- a/pkg/sentry/platform/ring0/lib_arm64.go +++ b/pkg/sentry/platform/ring0/lib_arm64.go @@ -28,13 +28,13 @@ func FlushTlbAll() // CPACREL1 returns the value of the CPACR_EL1 register. func CPACREL1() (value uintptr) -// FPCR returns the value of FPCR register. +// GetFPCR returns the value of FPCR register. func GetFPCR() (value uintptr) // SetFPCR writes the FPCR value. func SetFPCR(value uintptr) -// FPSR returns the value of FPSR register. +// GetFPSR returns the value of FPSR register. func GetFPSR() (value uintptr) // SetFPSR writes the FPSR value. |