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:	Mon, 24 Aug 2009 13:15:43 -0700
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	Nick Piggin <npiggin@...e.de>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"hpa@...or.com" <hpa@...or.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"linux-tip-commits@...r.kernel.org" 
	<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:x86/pat] generic-ipi: Allow cpus not yet online to call
 smp_call_function with irqs disabled

On Sun, 2009-08-23 at 22:40 -0700, Nick Piggin wrote:
> On Fri, Aug 21, 2009 at 11:51:50PM +0000, Suresh B wrote:
> > Commit-ID:  269c861baa2fe7c114c3bc7831292758d29eb336
> > Gitweb:     http://git.kernel.org/tip/269c861baa2fe7c114c3bc7831292758d29eb336
> > Author:     Suresh Siddha <suresh.b.siddha@...el.com>
> > AuthorDate: Wed, 19 Aug 2009 18:05:35 -0700
> > Committer:  H. Peter Anvin <hpa@...or.com>
> > CommitDate: Fri, 21 Aug 2009 16:25:43 -0700
> > 
> > generic-ipi: Allow cpus not yet online to call smp_call_function with irqs disabled
> > 
> > Because of deadlock possiblities smp_call_function() is not allowed to
> > be called with interrupts disabled. Add an exception for the cpu not
> > yet online, as no one else can send smp call function interrupt to this
> > cpu that is not yet online and as such deadlock condition is not possible.
> > 
> > Signed-off-by: Suresh Siddha <suresh.b.siddha@...el.com>
> > Acked-by: Nick Piggin <npiggin@...e.de>
> > Signed-off-by: H. Peter Anvin <hpa@...or.com>
> 
> I don't know if we should allow the use of smp_call_function here --
> only call_function_single. CPU hotplug code is required to set up
> some call_function data and if the cpu is offline then it might not
> be set up correctly.

We are doing the required allocations in CPU_UP_PREPARE. So we should be
okay for any smp_call_function usage.

> Also, I would say that we should just restrict this to wait==1 case
> because in that case the stack can trivially be used for data. In
> the wait==0 case, it is more complex. In the current implementation
> it should be OK (it uses per-cpu data), but we've used kmalloc
> there in the past, which probably wouldn't work either.

In future if we add any kmalloc, we already have checks in kmalloc()
that can be easily caught. I would like to make this change as generic
as possible.

thanks,
suresh

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