Commit 8d05f356 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Willy Tarreau

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>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 496355ec
...@@ -154,7 +154,7 @@ int hv_init(void) ...@@ -154,7 +154,7 @@ int hv_init(void)
/* See if the hypercall page is already set */ /* See if the hypercall page is already set */
rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64); 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) if (!virtaddr)
goto cleanup; 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