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: <4D6F3D1B.3030005@hitachi.com>
Date:	Thu, 03 Mar 2011 16:02:51 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <andi@...stfloor.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] x86: stop machine text poke should issue sync core

(2011/03/03 15:10), H. Peter Anvin wrote:
> On 02/28/2011 07:24 AM, Mathieu Desnoyers wrote:
>>
>> Index: linux-2.6-lttng/arch/x86/kernel/alternative.c
>> ===================================================================
>> --- linux-2.6-lttng.orig/arch/x86/kernel/alternative.c
>> +++ linux-2.6-lttng/arch/x86/kernel/alternative.c
>> @@ -612,6 +612,12 @@ static int __kprobes stop_machine_text_p
>>  
>>  	flush_icache_range((unsigned long)tpp->addr,
>>  			   (unsigned long)tpp->addr + tpp->len);
>> +	/*
>> +	 * Intel Archiecture Software Developer's Manual section 7.1.3 specifies
>> +	 * that a core serializing instruction such as "cpuid" should be
>> +	 * executed on _each_ core before the new instruction is made visible.
>> +	 */
>> +	sync_core();
>>  	return 0;
>>  }
>>  
> 
> Isn't this executed from an IPI handler, which will return with IRET (a
> serializing instruction) anyway?

No, now stop_machine uses per-cpu workqueue, so that handler will be
executed from worker threads. There is no iret anymore.

BTW, Mathieu, since the latest kernel has batch-text_poke_smp, this patch
needs to be updated.

Thank you,

-- 
Masami HIRAMATSU
2nd Dept. Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@...achi.com
--
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