diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-06-01 13:02:14 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-01 13:02:14 -0700 |
commit | 288a1ca6f09cc6213713d00dca0d18600d2e857c (patch) | |
tree | c1533a6af201816d6455c9be8c2f8e9468242dff /pkg/sentry | |
parent | 16100d18cbe27f01e1f0c147f91a694518ddc160 (diff) | |
parent | 5fa480a877b4aa4633797e2fd8cd0364eebc7366 (diff) |
Merge pull request #2689 from lubinszARM:pr_prot_none
PiperOrigin-RevId: 314186752
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/platform/kvm/machine_arm64.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/sentry/platform/kvm/machine_arm64.go b/pkg/sentry/platform/kvm/machine_arm64.go index e42505542..750751aa3 100644 --- a/pkg/sentry/platform/kvm/machine_arm64.go +++ b/pkg/sentry/platform/kvm/machine_arm64.go @@ -60,6 +60,12 @@ func rdonlyRegionsForSetMem() (phyRegions []physicalRegion) { if !vr.accessType.Write && vr.accessType.Read { rdonlyRegions = append(rdonlyRegions, vr.region) } + + // TODO(gvisor.dev/issue/2686): PROT_NONE should be specially treated. + // Workaround: treated as rdonly temporarily. + if !vr.accessType.Write && !vr.accessType.Read && !vr.accessType.Execute { + rdonlyRegions = append(rdonlyRegions, vr.region) + } }) for _, r := range rdonlyRegions { |