From: K. Y. Srinivasan Date: Thu, 9 Feb 2017 01:30:56 +0000 (-0700) Subject: drivers: hv: Turn off write permission on the hypercall page X-Git-Tag: firefly_0821_release~176^2^2^2~37 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4cdfa660c82b57828ffcca94950eccc9458e18e4;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Kees Cook Reported-by: Stephen Hemminger Tested-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 89fd0113aa5c..57c191798699 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -219,7 +219,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;