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]
Message-ID: <20080917141030.GC20510@elte.hu>
Date:	Wed, 17 Sep 2008 16:10:30 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Yan Li <elliot.li.tech@...il.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
	joerg.roedel@....com, rjmaomao@...il.com,
	Yinghai Lu <yhlu.kernel@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>, nancydreaming@...il.com
Subject: Re: [PATCH 1/2] VMware detection support for x86 and x86-64


* Yan Li <elliot.li.tech@...il.com> wrote:

> On Wed, Sep 17, 2008 at 12:52:38PM +0200, Ingo Molnar wrote:
> > > This code is from mtrr_trim_uncached_memory(), and used by
> > > setup_arch(), which is used far before PCI is ready.
> > > 
> > > Therefore I think we can only use DMI here. Any idea?
> > 
> > PCI quirks can be used almost arbitrarily early stage, see:
> > arch/x86/kernel/early-quirks.c.
> > 
> > Adding a VM identification callback to early-quirks.c would be fine. But 
> > if there's a reliable and specific enough DMI string that's fine as 
> > well. (but PCI is better, since it's a generally more stable enumeration 
> > interface)
> 
> The problem here is that mtrr_trim_uncached_memory() is called 108 
> lines before the invocation of early_quirks(), and 48 lines before 
> that of dmi_scan_machine(). That's quite early.  The only thing ran 
> before that is the initialization of CPU, so we have nearly nothing to 
> use to check the fingerprint of the underlying machine.

that still leaves the CPUID/MSR method for the virtualizer to announce 
itself.

> I feel It's also unfit to touch the whole PCI or DMI thing before CPU 
> registers and memory are settled.  A simple solution here is to only 
> issue a KERN_INFO when we detected mtrr is empty and later, when we 
> can be sure that the OS is not running as a VM, issue a warning. The 
> later part can be done in early_quirks().

ok, we can move the MTRR message further back, to after the early quirks 
phase.

	Ingo
--
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