Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2009 18:26:52 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r187400 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern
Message-ID:  <200901181826.n0IIQqed082847@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901181826.n0IIQqed082847>