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: <45E73825.30800@vmware.com>
Date:	Thu, 01 Mar 2007 12:31:33 -0800
From:	Zachary Amsden <zach@...are.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Rusty Russell <rusty@...tcorp.com.au>,
	Daniel Hecht <dhecht@...are.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Bug in on_each_cpu?

Andrew Morton wrote:
> The handler for smp_call_function() is called with local interrupts
> disabled (from the IPI handler).
>
> So to provide a consistent call environment for that handler, on_each_cpu()
> will also disable local interrupts when making the direct call on this CPU.
>
> Similarly the !CONFIG_SMP version of on_each_cpu() disables local
> interrupts when running the caller's function.
>   

Yes, that is sensible.  Something akin to on_each_cpu(synchronize_tscs) 
would certainly not like interrupts coming in.  Similarly, acpi_nmi 
disable and probably rcu barriers as well.  The irq disable here can 
very validly be used as a barrier, but trying to ensure preserved shared 
state with irq handlers over the call is a bug.

If one had all the spare time in the world, a new "sense" of irq disable 
that communicated this fact would be nice from a static or dynamic 
checking perspective.

Zach

------
sutra I.1 - atha linushasaanam
-
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