From owner-svn-src-stable-7@FreeBSD.ORG Sun Jan 18 18:26:52 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA1A10656C2; Sun, 18 Jan 2009 18:26:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A941E8FC17; Sun, 18 Jan 2009 18:26:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0IIQqXJ082848; Sun, 18 Jan 2009 18:26:52 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0IIQqed082847; Sun, 18 Jan 2009 18:26:52 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901181826.n0IIQqed082847@svn.freebsd.org> From: Alan Cox Date: Sun, 18 Jan 2009 18:26:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187400 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 18:26:53 -0000 Author: alc Date: Sun Jan 18 18:26:52 2009 New Revision: 187400 URL: http://svn.freebsd.org/changeset/base/187400 Log: MFC rev 179887 Enforce the mapping of kernel loadable modules in the uppermost 2GB of the kernel virtual address space on amd64. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/link_elf_obj.c Modified: stable/7/sys/kern/link_elf_obj.c ============================================================================== --- stable/7/sys/kern/link_elf_obj.c Sun Jan 18 17:54:03 2009 (r187399) +++ stable/7/sys/kern/link_elf_obj.c Sun Jan 18 18:26:52 2009 (r187400) @@ -667,6 +667,13 @@ link_elf_load_file(linker_class_t cls, c goto out; } ef->address = (caddr_t) vm_map_min(kernel_map); + + /* + * In order to satisfy amd64's architectural requirements on the + * location of code and data in the kernel's address space, request a + * mapping that is above the kernel. + */ + mapbase = KERNBASE; error = vm_map_find(kernel_map, ef->object, 0, &mapbase, round_page(mapsize), TRUE, VM_PROT_ALL, VM_PROT_ALL, FALSE); if (error) {