diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2017-02-08 20:30:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-10 09:48:00 -0500 |
commit | 372b1e91343e657a7cc5e2e2bcecd5140ac28119 (patch) | |
tree | 80ff09da182077c0add44fc6bd75ac061039f67b | |
parent | 3454323c954775098871559b5c23d877c3e23f77 (diff) |
drivers: 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.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: <stable@vger.kernel.org>
Acked-by: Kees Cook <keescook@chromium.org>
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/x86/hyperv/hv_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index c224b7df4d21..db64baf0e500 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c | |||
@@ -125,7 +125,7 @@ void hyperv_init(void) | |||
125 | guest_id = generate_guest_id(0, LINUX_VERSION_CODE, 0); | 125 | guest_id = generate_guest_id(0, LINUX_VERSION_CODE, 0); |
126 | wrmsrl(HV_X64_MSR_GUEST_OS_ID, guest_id); | 126 | wrmsrl(HV_X64_MSR_GUEST_OS_ID, guest_id); |
127 | 127 | ||
128 | hypercall_pg = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC); | 128 | hypercall_pg = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_RX); |
129 | if (hypercall_pg == NULL) { | 129 | if (hypercall_pg == NULL) { |
130 | wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0); | 130 | wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0); |
131 | return; | 131 | return; |