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] [day] [month] [year] [list]
Message-ID: <928CFBE8E7CB0040959E56B4EA41A77E4A4C1E88@irsmsx504.ger.corp.intel.com>
Date:	Wed, 25 Feb 2009 09:01:50 +0000
From:	"Metzger, Markus T" <markus.t.metzger@...el.com>
To:	Nathan Lynch <ntl@...ox.com>, Ingo Molnar <mingo@...e.hu>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"hpa@...or.com" <hpa@...or.com>,
	"markus.t.metzger@...il.com" <markus.t.metzger@...il.com>,
	"srostedt@...hat.com" <srostedt@...hat.com>
Subject: RE: [patch 1/6] x86, ftrace, hw-branch-tracer: support hotplug cpus

>-----Original Message-----
>From: Nathan Lynch [mailto:ntl@...ox.com]
>Sent: Tuesday, February 24, 2009 10:46 PM
>To: Ingo Molnar
>Cc: Metzger, Markus T; linux-kernel@...r.kernel.org; tglx@...utronix.de; hpa@...or.com;
>markus.t.metzger@...il.com; srostedt@...hat.com
>Subject: Re: [patch 1/6] x86, ftrace, hw-branch-tracer: support hotplug cpus
>
>On Tue, 24 Feb 2009 20:36:22 +0100
>Ingo Molnar <mingo@...e.hu> wrote:
>
>>
>> * Markus Metzger <markus.t.metzger@...el.com> wrote:
>>
>> > Support hotplug cpus.
>>
>> > +static int __cpuinit bts_hotcpu_handler(struct notifier_block *nfb,
>> > +				     unsigned long action, void *hcpu)
>> > +{
>> > +	unsigned int cpu = (unsigned long)hcpu;
>> > +
>> > +	mutex_lock(&bts_tracer_mutex);
>>
>> This is buggy: CPU hotplug handlers must not sleep (they are
>> called with irqs disabled)
>
>I don't think that is the case; the cpu notifier chains are "raw", not
>atomic, and the cpu hotplug core doesn't disable irqs while processing
>the chains afaict.  And there are several current examples of cpu
>hotplug callbacks performing sleeping operations (slab and slub,
>page_alloc, probably many others).

The hotplug code uses mutexes around raw_notifier_call_chain() calls in
all but one case:
  For CPU_STARTING_FROZEN, the caller has interrupts disabled.

I guess I could check the notification reason before grabbing the lock
in the handler.

regards,
markus.
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

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