Commit 8722bc8f authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Jiri Slaby

drivers: hv: Turn off write permission on the hypercall page

commit 372b1e91 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: default avatarK. Y. Srinivasan <kys@microsoft.com>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Reported-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Tested-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent b944de66
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment