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: <47BE0228.7020204@zytor.com>
Date:	Thu, 21 Feb 2008 14:58:48 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
CC:	Ian Campbell <ijc@...lion.org.uk>,
	Joel Becker <Joel.Becker@...cle.com>,
	Jody Belka <lists-lkml@...b.org>, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Andi Kleen <andi@...stfloor.org>,
	Mika Penttila <mika.penttila@...umbus.fi>
Subject: Re: 2.6.25-rc1 xen pvops regression

Jeremy Fitzhardinge wrote:
>>
>> What is the e820 information you feed the kernel?  We should only ever 
>> allocate page tables out of available RAM, not any other type of 
>> memory (reserved or not). 
> 
> The kernel gets a flat memory map; all memory is just plain RAM.  The 
> problem is that we're allocating a normal page and turning it into a 
> pagetable - so far so good.  Then the DMI code is randomly mapping that 
> same page RW so it can scan it for DMI signatures, which Xen is preventing.
> 
> There are two immediate fixes:
> 
>   1. Only scan for DMI if the memory is reserved (rejected, because HPA
>      says some machines don't reserve the DMI space).  Alternatively,
>      don't bother scanning if booting under Xen.
>   2. Make DMI map the memory RO so that Xen doesn't complain (which is
>      sensible because DMI is ROM anyway).
> 
> But as far as I can tell, this shouldn't be happening anyway, and could 
> happen on real hardware which doesn't reserve the DMI space.  It 
> probably doesn't because initial pagetables on real hardware use large 
> pages, and therefore allocate less memory for pagetable memory and 
> therefore doesn't end up hitting the 0xf0000 region.  But that area 
> should be excluded from the allocation pool.
> 

Which it is on real hardware, because although it's not *reserved* (type 
2), it is certainly not made available as *normal memory* (type 1).  If 
Xen maps this as type 1 then I definitely see the problem.

We can exclude type 1 memory from DMI scan, certainly.

However, Xen may want to consider why provide memory below the 1 MB 
point at all, and certainly whether it's wise to provide RAM in the 
640-1024 KB legacy region -- although you could argue that "it *should* 
work", odds are pretty good you'll have nasty surprises on a regular basis.

	-hpa

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