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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 28 May 2011 01:17:08 +0200
From:	Michal Hocko <mhocko@...e.cz>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Jack Steiner <steiner@....com>,
	Lee Schermerhorn <lee.schermerhorn@...com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Pekka Enberg <penberg@...helsinki.fi>,
	Paul Menage <menage@...gle.com>, Robin Holt <holt@....com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-mm@...ck.org
Subject: Re: [PATCH v2] cpusets: randomize node rotor used in
 cpuset_mem_spread_node()

On Fri 27-05-11 12:07:30, David Rientjes wrote:
> On Fri, 27 May 2011, Michal Hocko wrote:
> 
> > > alpha allmodconfig:
> > > 
> > > kernel/built-in.o: In function `cpuset_slab_spread_node':
> > > (.text+0x67360): undefined reference to `node_random'
> > > kernel/built-in.o: In function `cpuset_slab_spread_node':
> > > (.text+0x67368): undefined reference to `node_random'
> > > kernel/built-in.o: In function `cpuset_mem_spread_node':
> > > (.text+0x673b8): undefined reference to `node_random'
> > > kernel/built-in.o: In function `cpuset_mem_spread_node':
> > > (.text+0x673c0): undefined reference to `node_random'
> > > 
> > > because it has CONFIG_NUMA=n, CONFIG_NODES_SHIFT=7.
> > 
> > non-NUMA with MAX_NUMA_NODES? Hmm, really weird and looks like a numa
> > misuse.
> > 
> 
> CONFIG_NODES_SHIFT is used for UMA machines that are using DISCONTIGMEM 
> usually because they have very large holes; such machines don't need 
> things like mempolicies but do need the data structures that abstract 
> ranges of memory in the physical address space.  This build breakage 
> probably isn't restricted to only alpha, you could probably see it with at 
> least ia64 and mips as well.

Hmmm. I just find strange that some UMA arch uses functions like
{first,next}_online_node.

[...]
> > +/*
> > + * Return the bit number of a random bit set in the nodemask.
> > + * (returns -1 if nodemask is empty)
> > + */
> > +static inline int node_random(const nodemask_t *maskp)
> > +{
> > +	int w, bit = -1;
> > +
> > +	w = nodes_weight(*maskp);
> > +	if (w)
> > +		bit = bitmap_ord_to_pos(maskp->bits,
> > +			get_random_int() % w, MAX_NUMNODES);
> > +	return bit;
> > +}
> >  
> >  #else
> >  
> 
> Probably should have a no-op definition when MAX_NUMNODES == 1 that just 
> returns 0?

There is one, which has been added by the patch which introduced the
function. This is just an incremental patch for the compilation fix.

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
--
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