From owner-svn-src-projects@FreeBSD.ORG Fri Oct 9 03:02:31 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42F7E106568B; Fri, 9 Oct 2009 03:02:31 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3118A8FC21; Fri, 9 Oct 2009 03:02:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9932VuY041013; Fri, 9 Oct 2009 03:02:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9932ViG041011; Fri, 9 Oct 2009 03:02:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200910090302.n9932ViG041011@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 9 Oct 2009 03:02:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197891 - projects/ppc64/sys/powerpc/aim64 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2009 03:02:31 -0000 Author: nwhitehorn Date: Fri Oct 9 03:02:30 2009 New Revision: 197891 URL: http://svn.freebsd.org/changeset/base/197891 Log: Do not map the trap vectors into the kernel's address space. They are only used in real mode (with the exception of the reset vector, which does not work anyway in conjunction with 64-bit systems, even in bridge mode) and keeping them mapped only serves to make NULL a valid address. This results in silent NULL pointer deferences. Suggested by: Patrick Kerharo Modified: projects/ppc64/sys/powerpc/aim64/mmu_oea64.c Modified: projects/ppc64/sys/powerpc/aim64/mmu_oea64.c ============================================================================== --- projects/ppc64/sys/powerpc/aim64/mmu_oea64.c Fri Oct 9 02:00:32 2009 (r197890) +++ projects/ppc64/sys/powerpc/aim64/mmu_oea64.c Fri Oct 9 03:02:30 2009 (r197891) @@ -947,15 +947,17 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o ENABLE_TRANS(msr); /* - * Map certain important things, like ourselves and the exception - * vectors + * Map certain important things, like ourselves. + * + * NOTE: We do not map the exception vector space. That code is + * used only in real mode, and leaving it unmapped allows us to + * catch NULL pointer deferences, instead of making NULL a valid + * address. */ DISABLE_TRANS(msr); for (pa = kernelstart & ~PAGE_MASK; pa < kernelend; pa += PAGE_SIZE) moea64_kenter(mmup, pa, pa); - for (pa = EXC_RSVD; pa < EXC_LAST; pa += PAGE_SIZE) - moea64_kenter(mmup, pa, pa); ENABLE_TRANS(msr);