lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Jan 2013 19:23:35 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Dmitry Torokhov <dtor@...are.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
	X86 ML <x86@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	devel@...uxdriverproject.org, olaf@...fle.de, apw@...onical.com,
	jasowang@...hat.com, Thomas Gleixner <tglx@...utronix.de>,
	JBeulich@...e.com, Borislav Petkov <bp@...e.de>,
	"K. Y. Srinivasan" <kys@...rosoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>
Subject: Re: [PATCH -v2 2/2] x86: Make Linux guest support optional

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.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ