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:	Fri, 6 Jun 2008 16:57:17 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Vegard Nossum <vegard.nossum@...il.com>
Cc:	Mike Travis <travis@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: Tree for June 5


* Vegard Nossum <vegard.nossum@...il.com> wrote:

> > Thanks, yes I had that some after thought.  It should check the node 
> > index if CONFIG_DEBUG_PER_CPU_MAPS is enabled.  One gotcha is that 
> > nr_node_ids is intialized to MAX_NUMNODES until 
> > setup_node_to_cpumask_map() sets it to the correct value.  So uses 
> > before that should be caught by the earlier check.
> 
> I think it should always check the node index. The code in 
> kernel/sched.c (see above) calls node_to_cpumask(i) on nodes 0 < i < 
> MAX_NUMNODES and it WILL use invalid pointers. Or should 
> kernel/sched.c be changed to use nr_node_ids instead of MAX_NUMNODES? 
> I believe there are more places that do this than just sched.c.
> 
> I have attached two patches. The sched one fixes Andrew's boot 
> problem. The x86 one is untested, but I believe it is better to BUG 
> than silently corrupt some arbitrary memory. (Then the callers can be 
> found easily and fixed at least.)

nice fixes! I have applied both of them to -tip, this one to 
tip/sched-devel:

> Subject: [PATCH] sched: don't call node_to_cpumask() on nodes > nr_node_ids

AFAICS this is not yet required for v2.6.26, as the requirement to never 
iterate to MAX_NUMNODES and call nr_cpus_node() with the index only got 
introduced by Mike's patch.

and this one to tip/x86/numa:

> Subject: [PATCH] x86: don't return invalid pointers from node_to_cpumask()

and i've undone the revert of "x86: remove the static 256k 
node_to_cpumask_map" as well.

agreed?

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