diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-12 23:05:38 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-12 23:05:38 +0000 |
commit | a2e5062951e1dd7a996369edd9549e4dfa556dcb (patch) | |
tree | 35a108eeb01b26c8296389f9940044ea2355b33b /pkg/sentry/platform/ring0/pagetables | |
parent | 21c8249aa98a113270c9796494c618ad3f3697bf (diff) | |
parent | 252329c1f332319e2f1e2b28751aadd84dedae64 (diff) |
Merge release-20200810.0-18-g252329c1f (automated)
Diffstat (limited to 'pkg/sentry/platform/ring0/pagetables')
-rw-r--r-- | pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go b/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go index 78510ebed..6409d1d91 100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go @@ -72,13 +72,14 @@ const ( ) const ( - mtNormal = 0x4 << 2 + mtDevicenGnRE = 0x1 << 2 + mtNormal = 0x4 << 2 ) const ( executeDisable = xn optionMask = 0xfff | 0xfff<<48 - protDefault = accessed | shared | mtNormal + protDefault = accessed | shared ) // MapOpts are x86 options. @@ -184,8 +185,10 @@ func (p *PTE) Set(addr uintptr, opts MapOpts) { if opts.User { v |= user + v |= mtNormal } else { v = v &^ user + v |= mtDevicenGnRE // Strong order for the addresses with ring0.KernelStartAddress. } atomic.StoreUintptr((*uintptr)(p), v) } @@ -200,7 +203,7 @@ func (p *PTE) setPageTable(pt *PageTables, ptes *PTEs) { // This should never happen. panic("unaligned physical address!") } - v := addr | typeTable | protDefault + v := addr | typeTable | protDefault | mtNormal atomic.StoreUintptr((*uintptr)(p), v) } |