summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2017-02-08 18:30:56 -0700
committerBen Hutchings <ben@decadent.org.uk>2017-06-05 21:17:07 +0100
commit43506f192fac83d06f6f8d78ceaccf4128cc6df9 (patch)
treee3b172767a8ada558d8de228460358ffa13b1794
parentb324f30944811716d304158cf1dc2178a041afe2 (diff)
downloadlinux-stable-43506f192fac83d06f6f8d78ceaccf4128cc6df9.tar.gz
linux-stable-43506f192fac83d06f6f8d78ceaccf4128cc6df9.tar.bz2
linux-stable-43506f192fac83d06f6f8d78ceaccf4128cc6df9.zip
drivers: hv: Turn off write permission on the hypercall page
commit 372b1e91343e657a7cc5e2e2bcecd5140ac28119 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: K. Y. Srinivasan <kys@microsoft.com> Acked-by: Kees Cook <keescook@chromium.org> Reported-by: Stephen Hemminger <stephen@networkplumber.org> Tested-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [bwh: Backported to 3.16: adjust filename, context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--drivers/hv/hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index b83afe484415..a8b9eea5c4fc 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -156,7 +156,7 @@ int hv_init(void)
/* See if the hypercall page is already set */
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)
goto cleanup;