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:	Thu, 31 Mar 2011 08:56:07 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Tejun Heo <tj@...nel.org>
CC:	Ingo Molnar <mingo@...hat.com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH tip:x86/mm] x86-64, NUMA: Remove custom phys_to_nid()
 implementation

On 03/31/2011 06:57 AM, Tejun Heo wrote:
> phys_to_nid() maps physical address to NUMA node id.  This is
> implemented by building perfect hash in compute_hash_shift() during
> initialization.
>
> However, with SPARSE memory model, the nid is encoded in page flags.
> The perfect hash implementation was for DISCONTIG memory model which
> got removed years ago by b263295dbf (x86: 64-bit, make sparsemem
> vmemmap the only memory model).
>
> So, the perfect hash ends up being used only during initialization
> when the core SPARSE code already provides perfectly acceptable
> generic early_pfn_to_nid() implementation.
>
> Drop phys_to_nid() and use the generic ealry_pfn_to_nid() instead.
>
> Signed-off-by: Tejun Heo<tj@...nel.org>
> Cc: Christoph Lameter<cl@...ux-foundation.org>
> Cc: Ingo Molnar<mingo@...hat.com>
> Cc: Yinghai Lu<yinghai@...nel.org>
> Cc: "H. Peter Anvin"<hpa@...or.com>
> Cc: Thomas Gleixner<tglx@...utronix.de>
> ---
> If no one objects, will route through x86-mm.  Thanks.
>
>   arch/x86/Kconfig                 |    4 -
>   arch/x86/include/asm/mmzone_64.h |   23 -------
>   arch/x86/mm/numa_64.c            |  123 ---------------------------------------
>   3 files changed, 1 insertion(+), 149 deletions(-)

good finding.

Acked-by: Yinghai Lu <yinghai@...nel.org>
--
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