svn commit: r316769 - head/sys/arm64/arm64
Andrew Turner
andrew at FreeBSD.org
Thu Apr 13 16:57:03 UTC 2017
Author: andrew
Date: Thu Apr 13 16:57:02 2017
New Revision: 316769
URL: https://svnweb.freebsd.org/changeset/base/316769
Log:
Rather than checking if the top bit in a virtual address is a 0 or 1
compare against VM_MAXUSER_ADDRESS as we should have been doing.
Sponsored by: DARPA, AFRL
Modified:
head/sys/arm64/arm64/pmap.c
head/sys/arm64/arm64/trap.c
Modified: head/sys/arm64/arm64/pmap.c
==============================================================================
--- head/sys/arm64/arm64/pmap.c Thu Apr 13 15:52:45 2017 (r316768)
+++ head/sys/arm64/arm64/pmap.c Thu Apr 13 16:57:02 2017 (r316769)
@@ -2728,7 +2728,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va,
new_l3 |= ATTR_XN;
if ((flags & PMAP_ENTER_WIRED) != 0)
new_l3 |= ATTR_SW_WIRED;
- if ((va >> 63) == 0)
+ if (va < VM_MAXUSER_ADDRESS)
new_l3 |= ATTR_AP(ATTR_AP_USER) | ATTR_PXN;
CTR2(KTR_PMAP, "pmap_enter: %.16lx -> %.16lx", va, pa);
Modified: head/sys/arm64/arm64/trap.c
==============================================================================
--- head/sys/arm64/arm64/trap.c Thu Apr 13 15:52:45 2017 (r316768)
+++ head/sys/arm64/arm64/trap.c Thu Apr 13 16:57:02 2017 (r316769)
@@ -184,7 +184,7 @@ data_abort(struct trapframe *frame, uint
map = &p->p_vmspace->vm_map;
else {
/* The top bit tells us which range to use */
- if ((far >> 63) == 1) {
+ if (far >= VM_MAXUSER_ADDRESS) {
map = kernel_map;
} else {
map = &p->p_vmspace->vm_map;
More information about the svn-src-all
mailing list