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: <4EA0A424.3030907@zytor.com>
Date:	Thu, 20 Oct 2011 15:43:48 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Jacob Shin <jacob.shin@....com>
CC:	Andi Kleen <andi@...stfloor.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Yinghai Lu <yinghai.lu@...cle.com>,
	"Herrmann3, Andreas" <Andreas.Herrmann3@....com>,
	"x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] x86: Exclude E820_RESERVED regions and memory holes
 above 4 GB from direct mapping.

On 10/20/2011 03:10 PM, Jacob Shin wrote:
> On Thu, 2011-10-20 at 16:30 -0500, H. Peter Anvin wrote:
>> On 10/20/2011 02:28 PM, Andi Kleen wrote:
>>> Jacob Shin <jacob.shin@....com> writes:
>>>
>>>> On systems with very large memory (1 TB in our case), BIOS may report a
>>>> reserved region or a hole in the E820 map, even above the 4 GB range. Exclude
>>>> these from the direct mapping.
>>>
>>> This doesn't make much sense.  Holes above 4GB are completely legal.
>>>
>>> If you need to workaround a specific broken BIOS you would need a quirk
>>> only matching that system, with a suitable "BIOS is broken" message.
>>>
>>
>> The problem is that apparently right now we map those unconditionally
>> into the 1:1 map and mark them cacheable in PAT, which we *don't* for
>> the < 4 GiB map.
>>
>> This thus makes the behavior match < 4 GiB, which is the correct
>> behavior; this should be made clear in the patch description.
> 
> Will something like:
> 
> "On systems with very large memory (1 TB in our case), BIOS may report a
> reserved region or a hole in the E820 map, even above the 4 GB range.
> Avoid mapping them unconditionally into kernel 1:1 direct mapping as
> cacheable memory, as we also already do for the MMIO hole under 4 GB."
> 
> Work?
> 
> Otherwise, does the patch look acceptable?
> 

Drop the first half, and stop talking about "the MMIO hole" or anything
else with a definite article.

We're either doing this correctly for all holes or we have a bug.  If we
have a bug we should fix it in a general way, and I'm not convinced that
your patch is general enough.

I'm very bandwidth-constrained between kernel.org remediation and about
to leave for kernel summit, so I'm not sure how much detail I can look
into it right now.

	-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