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:	Fri, 17 Apr 2009 12:27:43 -0400 (EDT)
From:	Christoph Lameter <cl@...ux.com>
To:	Chris Friesen <cfriesen@...tel.com>
cc:	linux-kernel@...r.kernel.org, linux-mm <linux-mm@...ck.org>
Subject: Re: how to tell if arbitrary kernel memory address is backed by
 physical memory?


On Fri, 17 Apr 2009, Chris Friesen wrote:

> We have a mips board that appears to have holes in the lowmem mappings such
> that blindly walking all of it causes problems.  I assume the allocator knows
> about these holes and simply doesn't assign memory at those addresses.

Yes memory is registered in distinct ranges during boot.

> We may have found a solution though...it looks like virt_addr_valid() returns
> false for the problematic addresses.  Would it be reasonable to call this once
> for each page before trying to access it?

Sure. Note that virt_addr_valid only ensures that there is a page
struct for that address. You may need to ensure that PageReserved(page) is
false if you want to make sure that you have actual memory there that is
valid to use.

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