Commit 3397f738 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Ben Hutchings

drivers: hv: Turn off write permission on the hypercall page

commit 372b1e91 upstream.

The hypercall page only needs to be executable but currently it is setup to
be writable as well. Fix the issue.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Reported-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Tested-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent c1a88bb2
...@@ -178,7 +178,7 @@ int hv_init(void) ...@@ -178,7 +178,7 @@ int hv_init(void)
/* See if the hypercall page is already set */ /* See if the hypercall page is already set */
rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64); rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC); virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_RX);
if (!virtaddr) if (!virtaddr)
goto cleanup; goto cleanup;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment