All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hv: Turn off write permission on the hypercall page
@ 2017-03-10 17:27 Stephen Hemminger
  0 siblings, 0 replies; only message in thread
From: Stephen Hemminger @ 2017-03-10 17:27 UTC (permalink / raw
  To: gregkh, kys; +Cc: stable, Stephen Hemminger

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 <sthemmin@microsoft.com>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-10 17:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-10 17:27 [PATCH] hv: Turn off write permission on the hypercall page Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.