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]
Message-ID: <20111003192424.GB30091@phenom.oracle.com>
Date:	Mon, 3 Oct 2011 15:24:24 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Xen Devel <xen-devel@...ts.xensource.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Jan Glauber <jang@...ux.vnet.ibm.com>,
	Jason Baron <jbaron@...hat.com>,
	the arch/x86 maintainers <x86@...nel.org>,
	David Daney <david.daney@...ium.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Michael Ellerman <michael@...erman.id.au>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
	Ingo Molnar <mingo@...e.hu>, Tejun Heo <tj@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [Xen-devel] [PATCH RFC V2 2/5] stop_machine: make stop_machine
 safe and efficient to call early

On Sat, Oct 01, 2011 at 02:55:34PM -0700, Jeremy Fitzhardinge wrote:
> From: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
> 
> Make stop_machine() safe to call early in boot, before SMP has been
> set up, by simply calling the callback function directly if there's
> only one CPU online.
> 
> [ Fixes from AKPM:
>    - add comment
>    - local_irq_flags, not save_flags
>    - also call hard_irq_disable() for systems which need it
> 
>   Tejun suggested using an explicit flag rather than just looking at
>   the online cpu count. ]
> 
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
> Cc: Tejun Heo <tj@...nel.org>
> Cc: Rusty Russell <rusty@...tcorp.com.au>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: H. Peter Anvin <hpa@...ux.intel.com>
> Cc: Ingo Molnar <mingo@...e.hu>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> ---
>  kernel/stop_machine.c |   21 +++++++++++++++++++++
>  1 files changed, 21 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
> index ba5070c..9c59d9e 100644
> --- a/kernel/stop_machine.c
> +++ b/kernel/stop_machine.c
> @@ -41,6 +41,7 @@ struct cpu_stopper {
>  };
>  
>  static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper);
> +static bool stop_machine_initialized = false;

__read_mostly?

Thought it probably does not really matter that much in what section it
is put in.
--
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