Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753726AbdFSTHo (ORCPT + 2 others); Mon, 19 Jun 2017 15:07:44 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:52449 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751927AbdFSShB (ORCPT ); Mon, 19 Jun 2017 14:37:01 -0400 From: Willy Tarreau To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux@roeck-us.net Cc: "K. Y. Srinivasan" , Jiri Slaby , Willy Tarreau Subject: [PATCH 3.10 172/268] drivers: hv: Turn off write permission on the hypercall page Date: Mon, 19 Jun 2017 20:31:11 +0200 Message-Id: <1497897167-14556-173-git-send-email-w@1wt.eu> X-Mailer: git-send-email 2.8.0.rc2.1.gbe9624a In-Reply-To: <1497897167-14556-1-git-send-email-w@1wt.eu> References: <1497897167-14556-1-git-send-email-w@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: "K. Y. Srinivasan" 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: Jiri Slaby Signed-off-by: Willy Tarreau --- 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 b103955..4e4cb3d 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -154,7 +154,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.8.0.rc2.1.gbe9624a