svn commit: r336054 - head/sys/dev/hyperv/vmbus
Dexuan Cui
dexuan at FreeBSD.org
Sat Jul 7 00:41:05 UTC 2018
Author: dexuan
Date: Sat Jul 7 00:41:04 2018
New Revision: 336054
URL: https://svnweb.freebsd.org/changeset/base/336054
Log:
hyperv: Fix boot-up after malloc() returns memory of NX by default now
FreeBSD VM can't boot up on Hyper-V after the recent malloc change in
r335068: Make UMA and malloc(9) return non-executable memory in most cases.
The hypercall page here must be executable.
Fix the boot-up issue by adding M_EXEC.
PR: 229167
Sponsored by: Microsoft
Modified:
head/sys/dev/hyperv/vmbus/hyperv.c
Modified: head/sys/dev/hyperv/vmbus/hyperv.c
==============================================================================
--- head/sys/dev/hyperv/vmbus/hyperv.c Fri Jul 6 23:49:17 2018 (r336053)
+++ head/sys/dev/hyperv/vmbus/hyperv.c Sat Jul 7 00:41:04 2018 (r336054)
@@ -284,7 +284,7 @@ hypercall_create(void *arg __unused)
* - Assume kmem_malloc() returns properly aligned memory.
*/
hypercall_context.hc_addr = (void *)kmem_malloc(kernel_arena, PAGE_SIZE,
- M_WAITOK);
+ M_EXEC | M_WAITOK);
hypercall_context.hc_paddr = vtophys(hypercall_context.hc_addr);
/* Get the 'reserved' bits, which requires preservation. */
More information about the svn-src-head
mailing list