Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600365 > unrolled thread

[PATCH 3.12 60/60] drivers: hv: Turn off write permission on the hypercall page

Started byJiri Slaby <jslaby@suse.cz>
First post2017-03-14 14:30 +0100
Last post2017-03-14 14:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.12 60/60] drivers: hv: Turn off write permission on the hypercall page Jiri Slaby <jslaby@suse.cz> - 2017-03-14 14:30 +0100

#1600365 — [PATCH 3.12 60/60] drivers: hv: Turn off write permission on the hypercall page

FromJiri Slaby <jslaby@suse.cz>
Date2017-03-14 14:30 +0100
Subject[PATCH 3.12 60/60] drivers: hv: Turn off write permission on the hypercall page
Message-ID<tkUGv-Hf-61@gated-at.bofh.it>
From: "K. Y. Srinivasan" <kys@microsoft.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

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: Jiri Slaby <jslaby@suse.cz>
---
 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 3fdb9af08705..9c0d458ec232 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.12.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web