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]
Date:	Thu, 29 Jan 2009 10:39:42 -0800 (PST)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Peter Zijlstra <peterz@...radead.org>
cc:	Steven Rostedt <rostedt@...dmis.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Rusty Russell <rusty@...tcorp.com.au>, npiggin@...e.de,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Arjan van de Ven <arjan@...radead.org>,
	jens.axboe@...cle.com
Subject: Re: [PATCH -v2] use per cpu data for single cpu ipi calls



On Thu, 29 Jan 2009, Peter Zijlstra wrote:
> 
> Calls with wait=1 are deadlockable when done from within irqs or irq
> disabled sections because two cpus could cross ipi each other and stay
> waiting.

Sure. But this isn't the "wait=1" case. In the waiting case, we don't need 
to allocate anything at all, we can just use the stack.

So the only case that matters for interrupts is indeed "wait=0", but 
that's very much also the case we're talking about.

> That leaves us with the !wait case, which wasn't safe because that
> kmalloc could fail, and the fallback was wait, which yields the same
> deadlock.

Yes. I agree that the _concept_ of the patch is good. No argument there. 

I'm just worried about the details.

> That leaves us with 6 cases,
> 
> root@...top:/usr/src/linux-2.6# git grep "smp_call_function_single(.*0)"

This misses a _lot_ of cases. What about this one:

	kernel/relay.c:                 err = smp_call_function_single(i,

where you're not seeing if it's a non-waiting one or not (it's a waiting 
one, but my point is that your grep is missing cases).

Doing

	git grep -w smp_call_function_single | grep -v '1);'

is probably more likely to find the cases to look for.

But you're right, I'm still not seeing anything that looks _likely_ to be 
a problem. But I worry that it's something somebody may want to do.

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