diff options
author | Min Le <lemin.lm@antgroup.com> | 2020-09-22 16:45:10 +0800 |
---|---|---|
committer | Min Le <lemin.lm@antgroup.com> | 2020-10-08 20:33:09 +0800 |
commit | 190cf30e41cdd7b23d53d86024afeabbcd92a0db (patch) | |
tree | 795dec4c0422464826a15ced8633988dc8546db7 /pkg/sentry/platform/ring0 | |
parent | a38f1d145797b307afc34985533f3b9208eacc7d (diff) |
arm64: the mair_el1 value is wrong
the correct value needed is 0xbbff440c0400 but the const
defined is 0x000000000000ffc0 due to the operator error
in _MT_EL1_INIT, both kernel and user space memory
attribute should be Normal memory not DEVICE_nGnRE
Signed-off-by: Min Le <lemin.lm@antgroup.com>
Diffstat (limited to 'pkg/sentry/platform/ring0')
-rw-r--r-- | pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go b/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go index 6409d1d91..520161755 100644 --- a/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go +++ b/pkg/sentry/platform/ring0/pagetables/pagetables_aarch64.go @@ -78,7 +78,7 @@ const ( const ( executeDisable = xn - optionMask = 0xfff | 0xfff<<48 + optionMask = 0xfff | 0xffff<<48 protDefault = accessed | shared ) @@ -188,7 +188,7 @@ func (p *PTE) Set(addr uintptr, opts MapOpts) { v |= mtNormal } else { v = v &^ user - v |= mtDevicenGnRE // Strong order for the addresses with ring0.KernelStartAddress. + v |= mtNormal } atomic.StoreUintptr((*uintptr)(p), v) } |