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: v4.11-rc1~118^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=372b1e91343e657a7cc5e2e2bcecd5140ac28119;p=platform%2Fkernel%2Flinux-exynos.git drivers: hv: Turn off write permission on the hypercall page 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 Cc: Acked-by: Kees Cook Reported-by: Stephen Hemminger Tested-by: Stephen Hemminger Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index c224b7d..db64baf0 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -125,7 +125,7 @@ void hyperv_init(void) guest_id = generate_guest_id(0, LINUX_VERSION_CODE, 0); wrmsrl(HV_X64_MSR_GUEST_OS_ID, guest_id); - hypercall_pg = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC); + hypercall_pg = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_RX); if (hypercall_pg == NULL) { wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0); return;