diff options
author | Dexuan Cui <dexuan@FreeBSD.org> | 2018-07-07 00:41:04 +0000 |
---|---|---|
committer | Dexuan Cui <dexuan@FreeBSD.org> | 2018-07-07 00:41:04 +0000 |
commit | 96f105d11fdc77359005c6d61604760a78f99ddb (patch) | |
tree | 6d61d03b5ad6f3a43959f361e672995efd96702c | |
parent | a9c91abd3bd42d90a40bf89ba8682746700455ac (diff) | |
download | src-96f105d11fdc77359005c6d61604760a78f99ddb.tar.gz src-96f105d11fdc77359005c6d61604760a78f99ddb.zip |
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
Notes
Notes:
svn path=/head/; revision=336054
-rw-r--r-- | sys/dev/hyperv/vmbus/hyperv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/hyperv/vmbus/hyperv.c b/sys/dev/hyperv/vmbus/hyperv.c index 050251cfc1b6..f9ec0b67dc7b 100644 --- a/sys/dev/hyperv/vmbus/hyperv.c +++ b/sys/dev/hyperv/vmbus/hyperv.c @@ -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. */ |