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:	Wed, 10 Mar 2010 15:05:47 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Greg KH <gregkh@...e.de>
cc:	linux-kernel@...r.kernel.org
Subject: Re: [patch] numa: fix BUILD_BUG_ON for node_read_distance

On Wed, 10 Mar 2010, Greg KH wrote:

> > node_read_distance() has a BUILD_BUG_ON() to prevent buffer overruns when
> > the number of nodes printed will exceed the buffer length.
> > 
> > Each node only needs four chars: three for distance (maximum distance is
> > 255) and one for a seperating space or a trailing newline.
> 
> Is this causing a problem as-is today that we need to resolve for
> 2.6.34?  Or is this 2.6.35 material?
> 

It's not needed at least for x86 for 2.6.34 since the max 
CONFIG_NODES_SHIFT is 9.  I don't know about other architectures with 
different ranges or page sizes.

I'm going to push a change to the x86 maintainers to increase that max 
CONFIG_NODES_SHIFT to 10 hopefully for 2.6.35, that's where we run into 
this error.

> Who chose this original number, and why is it off by 1/2?
> 

It's earlier than the git history, but there's no reason to divide 
PAGE_SIZE in half.  We've been running machines with this patch for well 
over a year and /sys/devices/system/node/nodeN/distance works just fine 
with 1K nodes.
--
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