Return-Path: Received: from mail-pf0-f170.google.com ([209.85.192.170]:35895 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932854AbdCJR1k (ORCPT ); Fri, 10 Mar 2017 12:27:40 -0500 Received: by mail-pf0-f170.google.com with SMTP id o126so44211709pfb.3 for ; Fri, 10 Mar 2017 09:27:40 -0800 (PST) From: Stephen Hemminger To: gregkh@linux-foundation.org, kys@microsoft.com Cc: stable@vger.kernel.org, Stephen Hemminger Subject: [PATCH] hv: Turn off write permission on the hypercall page Date: Fri, 10 Mar 2017 09:27:34 -0800 Message-Id: <20170310172734.10213-1-sthemmin@microsoft.com> Sender: stable-owner@vger.kernel.org List-ID: The hypercall page only needs to be executable but currently it is setup to be writable as well. Fix the issue. Backport of upstream commit 372b1e91343e to earlier kernels. Tested on 4.9. Signed-off-by: Stephen Hemminger --- drivers/hv/hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index 60dbd6cb4640..ce2aa14604e2 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -220,7 +220,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; -- 2.11.0