From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753040Ab2LQQBD (ORCPT ); Mon, 17 Dec 2012 11:01:03 -0500 Received: from nat28.tlf.novell.com ([130.57.49.28]:36720 "EHLO nat28.tlf.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752557Ab2LQQBB convert rfc822-to-8bit (ORCPT ); Mon, 17 Dec 2012 11:01:01 -0500 Message-Id: <50CF4FC502000078000B0CB6@nat28.tlf.novell.com> X-Mailer: Novell GroupWise Internet Agent 12.0.1 Date: Mon, 17 Dec 2012 16:00:53 +0000 From: "Jan Beulich" To: "Linus Torvalds" Cc: "Arnd Bergmann" , "Ingo Molnar" , "Michael Kerrisk" , "Guennadi Liakhovetski" , "Matt Fleming" , "Thomas Gleixner" , "H. Peter Anvin" , "Paul E. McKenney" , "Dave Jones" , "David Howells" , "Grant Likely" , "Markus Trippelsdorf" , "Linux Kernel Mailing List" Subject: Re: [GIT PULL] x86/uapi for 3.8 References: <201212122211.qBCMBRxl027895@terminus.zytor.com> <23916.1355356085@warthog.procyon.org.uk> <21507.1355528749@warthog.procyon.org.uk> <20121215163323.GA229@x4> <50CEEE3302000078000B0AC0@nat28.tlf.novell.com> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 17.12.12 at 16:44, Linus Torvalds wrote: > On Mon, Dec 17, 2012 at 1:04 AM, Jan Beulich wrote: >> >> How about this being caused by using the same lower level >> page table entries that swapper_pg_dir uses, namely including >> the _PAGE_GLOBAL bits? efi_call_virt_{pre,epi}log() only write >> CR3 (see 185034e72d591f9465e5e18f937ed642e7ea0070), but >> would need to also flip CR4.PGE afaict. > > Now *this* is the kind of issue that I could easily see causing major > corruption, but be subtle enough to not happen reliably. Coming back > from the EFI calls (or going into them) with stale TLB contents due to > global pages could explain things. > > Good thinking. That efi call code should use flush_tlb_kernel() (or > __flush_tlb_global() if it wants to avoid any paravirtualization > stuff) if it has global pages in different places from the normal > kernel map. Does it really have that? I don't see it having such. But I also don't think flush_tlb_kernel() is the right mechanism here. I'd rather suggest clearing CR4.PGE in the "prelog", an restore it in the epilog. Para-virtual environments shouldn't be directly interfacing with EFI runtime code anyway. Jan