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] [day] [month] [year] [list]
Date:	Mon, 19 Jan 2009 10:45:47 -0800
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	Pavel Machek <pavel@...e.cz>
Cc:	"Siddha, Suresh B" <suresh.b.siddha@...el.com>,
	"H. Peter Anvin" <hpa@...or.com>, "mingo@...e.hu" <mingo@...e.hu>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"tvignaud@...driva.com" <tvignaud@...driva.com>
Subject: Re: [patch] x86, pat: fix reserve_memtype() for legacy 1MB range

On Sat, Jan 17, 2009 at 09:42:25AM -0800, Pavel Machek wrote:
> On Fri 2009-01-09 14:48:04, Suresh Siddha wrote:
> > On Fri, Jan 09, 2009 at 02:39:31PM -0800, H. Peter Anvin wrote:
> > > Suresh Siddha wrote:
> > > >
> > > > Here X is trying to map first 8KB of memory using /dev/mem. Existing
> > > > code treats first 0-4KB of memory as non-RAM and 4KB-8KB as RAM. Recent
> > > > code changes don't allow to map memory with different attributes
> > > > at the same time.
> > > >
> > >
> > > Why was 0-4 KB marked as non-RAM?  It is most definitely RAM, and should
> > > be WB.
> >
> > While in reality it is RAM, we have CONFIG_STRICT_DEVMEM which doesn't allow
> > apps to map RAM pages using /dev/mem. And to allow app's to map the
> > legacy 0-4KB bios data page, we consider it as non-RAM.
> 
> Fix config_strict_devmem? Ram is ram, and we should not li for
> strict_devmem benefit...

This is not just related to CONFIG_STRICT_DEVMEM. This is how we track
the PAT attribute for this 1MB physical address range even in the case of
!CONFIG_STRICT_DEVMEM

In some portions of the x86 code, we treat legacy first 1MB as special.
CONFIG_STRICT_DEVMEM is one of them.

For this range, we don't really follow what e820 says about this region. For
example, for some of the systems, e820 table doesn't even include some portions
of this 1MB region etc.

I looked at including this 1MB check in page_is_ram(). But this routine
is called at various generic places (like mem_init() where it really needs
to know what e820 says etc).

thanks,
suresh
--
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