From owner-svn-src-head@freebsd.org Thu Apr 13 16:57:03 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93118D3CE0C; Thu, 13 Apr 2017 16:57:03 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 636F2617; Thu, 13 Apr 2017 16:57:03 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DGv2LQ033396; Thu, 13 Apr 2017 16:57:02 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DGv2mB033394; Thu, 13 Apr 2017 16:57:02 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201704131657.v3DGv2mB033394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 13 Apr 2017 16:57:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316769 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 16:57:03 -0000 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;