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

On Wed, Jan 13, 2010 at 09:53:10PM +0800, Wu Fengguang wrote:
> vread()/vwrite() is only called from kcore/kmem to access one page at a time.
> So the logic can be vastly simplified.
> 
> The changes are:
> - remove the vmlist walk and rely solely on vmalloc_to_page()
> - replace the VM_IOREMAP check with (page && page_is_ram(pfn))
> - rename to vread_page()/vwrite_page()
> 
> The page_is_ram() check is necessary because kmap_atomic() is not
> designed to work with non-RAM pages.

I don't know if you can really do this. Previously vmlist_lock would be
taken, which will prevent these vm areas from being freed.

 
> Note that even for a RAM page, we don't own the page, and cannot assume
> it's a _PAGE_CACHE_WB page.

So why is this not a problem for your patch? I don't see how you handle
it.

What's the problem with the current code, exactly? I would prefer that
you continue using the same vmlist locking and checking for validating
addresses.

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