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]
Message-ID: <20091103160734.GA21362@elte.hu>
Date:	Tue, 3 Nov 2009 17:07:34 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Ian Campbell <Ian.Campbell@...rix.com>, Tejun Heo <tj@...nel.org>,
	"Paul E. McKenney" <paulmck@...ibm.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Correct nr_processes() when CPUs have been unplugged


* Ian Campbell <Ian.Campbell@...rix.com> wrote:

> I'm not 100% convinced that the per_cpu regions remain valid for 
> offline CPUs, although my testing suggests that they do. If not then I 
> think the correct solution would be to aggregate the process_count for 
> a given CPU into a global base value in cpu_down().

Sidenote: percpu areas currently are kept allocated on x86.

That might change in the future though, especially with virtual systems 
where the possible range of CPUs can be very high - without us 
necessarily wanting to pay the percpu area allocation price for it. I.e. 
dynamic deallocation of percpu areas is something that could happen in 
the future.

> This bug appears to pre-date the transition to git and it looks like 
> it may even have been present in linux-2.6.0-test7-bk3 since it looks 
> like the code Rusty patched in http://lwn.net/Articles/64773/ was 
> already wrong.

Nice one. I'm wondering why it was not discovered for such a long time. 
That count can go out of sync easily, and we frequently offline cpus 
during suspend/resume, and /proc lookup failures will be noticed in 
general. How come nobody ran into this? And i'm wondering how you have 
run into this - running cpu hotplug stress-tests with Xen guests - or 
via pure code review?

	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