From: Stephen Hemminger <stephen@networkplumber.org>
To: kys@exchange.microsoft.com
Cc: kys@microsoft.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com,
jasowang@redhat.com, leann.ogasawara@canonical.com,
keescook@google.com, sds@tycho.nsa.gov, <stable@vger.kernel.org>
Subject: Re: [PATCH 1/1] Ddrivers: hv: Turn off write permission on the hypercall page
Date: Thu, 9 Feb 2017 17:12:01 -0800 [thread overview]
Message-ID: <20170209112105.3a46d70d@xeon-e3> (raw)
In-Reply-To: <1486603856-27642-1-git-send-email-kys@exchange.microsoft.com>
On Wed, 8 Feb 2017 18:30:56 -0700
kys@exchange.microsoft.com wrote:
> From: K. Y. Srinivasan <kys@microsoft.com>
>
> 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>
> ---
> 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 c224b7d..db64baf 100644
> --- a/arch/x86/hyperv/hv_init.c
> +++ b/arch/x86/hyperv/hv_init.c
> @@ -125,7 +125,7 @@ void hyperv_init(void)
> guest_id = generate_guest_id(0, LINUX_VERSION_CODE, 0);
> wrmsrl(HV_X64_MSR_GUEST_OS_ID, guest_id);
>
> - hypercall_pg = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC);
> + hypercall_pg = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_RX);
> if (hypercall_pg == NULL) {
> wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);
Verified that this fixes the original problem.
I don't see the warning anymore and the guest works normally.
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Stephen Hemminger <stephen@networkplumber.org>
next prev parent reply other threads:[~2017-02-10 1:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1486603856-27642-1-git-send-email-kys@exchange.microsoft.com>
2017-02-09 4:44 ` [PATCH 1/1] Ddrivers: hv: Turn off write permission on the hypercall page Kees Cook
2017-02-09 6:54 ` Greg KH
2017-02-09 15:48 ` KY Srinivasan
2017-02-10 1:12 ` Stephen Hemminger [this message]
2017-02-10 14:47 ` Greg KH
2017-02-10 15:15 ` KY Srinivasan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170209112105.3a46d70d@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=keescook@google.com \
--cc=kys@exchange.microsoft.com \
--cc=kys@microsoft.com \
--cc=leann.ogasawara@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=sds@tycho.nsa.gov \
--cc=stable@vger.kernel.org \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox