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: <20100107122304.b5c1d777.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Thu, 7 Jan 2010 12:23:04 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Huang Ying <ying.huang@...el.com>
Cc:	"Wu, Fengguang" <fengguang.wu@...el.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Tejun Heo <tj@...nel.org>, Ingo Molnar <mingo@...e.hu>,
	Nick Piggin <npiggin@...e.de>,
	Andi Kleen <andi@...stfloor.org>,
	Hugh Dickins <hugh.dickins@...cali.co.uk>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Linux Memory Management List <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH] vmalloc: simplify vread()/vwrite()

On Thu, 07 Jan 2010 11:15:41 +0800
Huang Ying <ying.huang@...el.com> wrote:

> > > 
> > > > The page_is_ram() check is necessary because kmap_atomic() is not
> > > > designed to work with non-RAM pages.
> > > > 
> > > I think page_is_ram() is not a complete method...on x86, it just check
> > > e820's memory range. checking VM_IOREMAP is better, I think.
> > 
> > (double check) Not complete or not safe?
> > 
> > EFI seems to not update e820 table by default.  Ying, do you know why?
> 
> In EFI system, E820 table is constructed from EFI memory map in boot
> loader, so I think you can rely on E820 table.
> 
Yes, we can rely on. But concerns here is that we cannot get any
information of ioremap via e820 map. 

But yes,
== ioremap()
 140         for (pfn = phys_addr >> PAGE_SHIFT;
 141                                 (pfn << PAGE_SHIFT) < (last_addr & PAGE_MASK);
 142                                 pfn++) {
 143 
 144                 int is_ram = page_is_ram(pfn);
 145 
 146                 if (is_ram && pfn_valid(pfn) && !PageReserved(pfn_to_page(pfn)))
 147                         return NULL;
 148                 WARN_ON_ONCE(is_ram);
 149         }
==
you'll get warned before access if "ram" area is remapped...

But, about this patch, it seems that page_is_ram() is not free from architecture
dependecy.


Thanks,
-Kame

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