hv: Turn off write permission on the hypercall page
Subsystems (2)
PATCH 1/1 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.
Backport of upstream commit 372b1e91343e to earlier kernels. Tested on 4.9.
Signed-off-by Stephen Hemminger <[email protected]>
--- drivers/hv/hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hv/hv.c +1 -1
@@ -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;
Signature · 1 line
2.11.0