Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Nov 2014 23:07:22 +0000 (UTC)
From:      Peter Grehan <grehan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274931 - head/sys/amd64/vmm
Message-ID:  <201411232307.sANN7Mu4041301@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grehan
Date: Sun Nov 23 23:07:21 2014
New Revision: 274931
URL: https://svnweb.freebsd.org/changeset/base/274931

Log:
  Change the lower bound for guest vmspace allocation to 0 instead of
  using the VM_MIN_ADDRESS constant.
  
  HardenedBSD redefines VM_MIN_ADDRESS to be 64K, which results in
  bhyve VM startup failing. Guest memory is always assumed to start
  at 0 so use the absolute value instead.
  
  Reported by:	Shawn Webb, lattera at gmail com
  Reviewed by:	neel, grehan
  Obtained from:	Oliver Pinter via HardenedBSD
  https://github.com/HardenedBSD/hardenedBSD/commit/23bd719ce1e3a8cc42fc8317b1c7c6d9e74dcba0
  MFC after:	1 week

Modified:
  head/sys/amd64/vmm/vmm.c

Modified: head/sys/amd64/vmm/vmm.c
==============================================================================
--- head/sys/amd64/vmm/vmm.c	Sun Nov 23 22:28:46 2014	(r274930)
+++ head/sys/amd64/vmm/vmm.c	Sun Nov 23 23:07:21 2014	(r274931)
@@ -389,7 +389,7 @@ vm_create(const char *name, struct vm **
 	if (name == NULL || strlen(name) >= VM_MAX_NAMELEN)
 		return (EINVAL);
 
-	vmspace = VMSPACE_ALLOC(VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS);
+	vmspace = VMSPACE_ALLOC(0, VM_MAXUSER_ADDRESS);
 	if (vmspace == NULL)
 		return (ENOMEM);
 



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