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:	Thu, 29 Sep 2011 10:06:40 -0700
From:	David Daney <david.daney@...ium.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
CC:	Jan Glauber <jang@...ux.vnet.ibm.com>,
	Jason Baron <jbaron@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Michael Ellerman <michael@...erman.id.au>,
	David Daney <ddaney@...iumnetworks.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: Jump Label initialization

On 09/29/2011 09:45 AM, Jeremy Fitzhardinge wrote:
> On 09/29/2011 05:04 AM, Jan Glauber wrote:
>>
>> s390 does not have the early() variant since it didn't need it. On
>> pre-SMP we probably don't need stop_machine() so creating
>> arch_jump_label_transform_early() by leaving out stop_machine()
>> and patching the code directly should be fine.
>
> Well, it occurs to me that if you're using jump_label_enable() very
> early, then it will be using the full arch_jump_label_transform()
> anyway.  While the stop_machine(), locking, etc that the full version
> does is redundant in a pre-SMP environment, it shouldn't hurt, so
> perhaps there's no need for an _early variant at all.
>

You need a way to guarantee that the code you are modifying is not in 
the instruction cache of the off-line CPUs.

On our (Cavium) SMP MIPS systems, these off-line CPUs are most likely 
spinning in architecture specific smp startup code somewhere in the 
kernel image.  If this code happened to be adjacent to something the 
arch_jump_label_transform_early() would touch, we could have a problem.

The solution is fairly simple, just invalidate the instruction cache 
immediately upon leaving the spinning loop.

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