diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-11-11 16:15:12 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-11-11 16:15:12 -0800 |
commit | 07f9041187c5aedb8b3d3abdec17f3f00d159153 (patch) | |
tree | 5d8a04c7a45bd337821b02b8dbf20ddd541bb3c0 /pkg/sentry/platform/ring0/defs_amd64.go | |
parent | 2b0e4dc6aa7fb8a3f619220b72537a8fff2f95b4 (diff) | |
parent | 2cee0669299cd2b980aa9ae253c24107a4813b26 (diff) |
Merge pull request #918 from lubinszARM:pr_ring0
PiperOrigin-RevId: 279840214
Diffstat (limited to 'pkg/sentry/platform/ring0/defs_amd64.go')
-rw-r--r-- | pkg/sentry/platform/ring0/defs_amd64.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/sentry/platform/ring0/defs_amd64.go b/pkg/sentry/platform/ring0/defs_amd64.go index 7206322b1..10dbd381f 100644 --- a/pkg/sentry/platform/ring0/defs_amd64.go +++ b/pkg/sentry/platform/ring0/defs_amd64.go @@ -20,6 +20,17 @@ import ( "gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables" ) +var ( + // UserspaceSize is the total size of userspace. + UserspaceSize = uintptr(1) << (VirtualAddressBits() - 1) + + // MaximumUserAddress is the largest possible user address. + MaximumUserAddress = (UserspaceSize - 1) & ^uintptr(usermem.PageSize-1) + + // KernelStartAddress is the starting kernel address. + KernelStartAddress = ^uintptr(0) - (UserspaceSize - 1) +) + // Segment indices and Selectors. const ( // Index into GDT array. |