From: Borislav Petkov <bp@alien8.de>
To: Dmitry Torokhov <dtor@vmware.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>,
X86 ML <x86@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
jasowang@redhat.com, Thomas Gleixner <tglx@linutronix.de>,
JBeulich@suse.com, Borislav Petkov <bp@suse.de>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>
Subject: Re: [PATCH -v2 2/2] x86: Make Linux guest support optional
Date: Fri, 25 Jan 2013 19:23:35 +0100 [thread overview]
Message-ID: <20130125182335.GA1380@pd.tnic> (raw)
In-Reply-To: <20130125180730.GA29810@dtor-ws.eng.vmware.com>
On Fri, Jan 25, 2013 at 10:07:31AM -0800, Dmitry Torokhov wrote:
> > - if (x86_hyper != &x86_hyper_ms_hyperv)
> > + if (!x86_hyper || strncmp(x86_hyper->name, "VMware", 6))
> > return -ENODEV;
>
> I assume this is a typo as I doubt MS is using the same signature as we
> do.
Yeah, Vmware is assimilating Microsoft. :-)
Damn copy-paste crap. Sorry, will fix.
> > diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c
> > index cb56e270da11..85f15a6d8798 100644
> > --- a/drivers/misc/vmw_balloon.c
> > +++ b/drivers/misc/vmw_balloon.c
> > @@ -786,7 +786,7 @@ static int __init vmballoon_init(void)
> > * Check if we are running on VMware's hypervisor and bail out
> > * if we are not.
> > */
> > - if (x86_hyper != &x86_hyper_vmware)
> > + if (!x86_hyper || strncmp(x86_hyper->name, "VMware", 6))
> > return -ENODEV;
> >
>
> I wonder why you decided to switch from address matching (which is quite
> precise and would potentially allow adding signatures without needing
> to change the drivers) to string matching?
Ok, this is a bit more involved. If we put all hypervisor stuff behind
CONFIG_HYPERVISOR_GUEST and in the cases where this is disabled,
the build fails because the x86_hyper_vmware symbol is undefined.
Alternatively, this doesn't happen when we look at the name.
But why would you want to add signatures? Isn't "VMware" enough as a
name for the vmware hypervisor and why would you need more? And besides,
hypervisor_x86.name is only a single const char * so you'd need to
change that struct to add more names...Hm.
Thanks.
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2013-01-25 18:20 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 1:56 [PATCH RESEND 1/1] X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts K. Y. Srinivasan
2013-01-24 9:28 ` Borislav Petkov
2013-01-24 12:11 ` H. Peter Anvin
2013-01-24 17:35 ` Borislav Petkov
2013-01-24 17:36 ` H. Peter Anvin
2013-01-24 17:39 ` [PATCH 1/2] x86, Kconfig: Move PARAVIRT_DEBUG into the paravirt menu Borislav Petkov
2013-01-24 17:39 ` [PATCH 2/2] x86: Make Linux guest support optional Borislav Petkov
2013-01-25 8:21 ` [PATCH 1/2] x86, Kconfig: Move PARAVIRT_DEBUG into the paravirt menu Ingo Molnar
2013-01-25 8:51 ` Borislav Petkov
2013-01-25 9:20 ` Ingo Molnar
2013-01-25 9:29 ` Borislav Petkov
2013-01-25 9:32 ` Ingo Molnar
2013-01-25 10:06 ` Borislav Petkov
2013-01-25 17:59 ` [PATCH -v2 " Borislav Petkov
2013-01-25 17:59 ` [PATCH -v2 2/2] x86: Make Linux guest support optional Borislav Petkov
2013-01-25 18:07 ` Dmitry Torokhov
2013-01-25 18:23 ` Borislav Petkov [this message]
2013-01-25 18:29 ` Dmitry Torokhov
2013-01-25 18:35 ` Borislav Petkov
2013-01-25 18:43 ` Borislav Petkov
2013-01-27 1:26 ` H. Peter Anvin
2013-01-27 10:30 ` Borislav Petkov
2013-01-25 18:12 ` Dmitry Torokhov
2013-01-25 18:32 ` Borislav Petkov
2013-01-25 18:42 ` Dmitry Torokhov
2013-01-25 19:03 ` Borislav Petkov
2013-01-26 23:10 ` [PATCH -v3 1/2] x86, Kconfig: Move PARAVIRT_DEBUG into the paravirt menu Borislav Petkov
2013-01-26 23:10 ` [PATCH -v3 2/2] x86: Make Linux guest support optional Borislav Petkov
2013-01-27 11:06 ` Borislav Petkov
2013-01-28 10:18 ` [PATCH -v3.1] " Borislav Petkov
2013-01-24 17:42 ` [PATCH RESEND 1/1] X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts 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=20130125182335.GA1380@pd.tnic \
--to=bp@alien8.de \
--cc=JBeulich@suse.com \
--cc=apw@canonical.com \
--cc=bp@suse.de \
--cc=devel@linuxdriverproject.org \
--cc=dtor@vmware.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=olaf@aepfle.de \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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