Commit e53554da authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Sasha Levin

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

[ Upstream commit 372b1e91 ]

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>
Cc: <stable@vger.kernel.org>
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 avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
parent 5fdf5951
......@@ -164,7 +164,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