aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2017-02-08 20:30:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-14 22:02:52 -0400
commit182ff0ebbdab926578728784299cc9d9c195d515 (patch)
treef944c534d5705f4b31f0193d695d2356e2625557 /drivers/hv
parent63e873679ba99649bf22cc7b964315591cedf4c5 (diff)
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>
Diffstat (limited to 'drivers/hv')
-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 6e49a4dd99c0..e0a8216ecf2b 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -220,7 +220,7 @@ int hv_init(void)
220 /* See if the hypercall page is already set */ 220 /* See if the hypercall page is already set */
221 rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64); 221 rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
222 222
223 virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC); 223 virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_RX);
224 224
225 if (!virtaddr) 225 if (!virtaddr)
226 goto cleanup; 226 goto cleanup;