From: Keir Fraser Subject: Re: [PATCH] i386 linux: make 32-bit PAE kernel work when built with newer gcc Date: Fri, 17 Mar 2006 10:19:21 +0000 Message-ID: References: <4415AE7C.76F0.0078.0@novell.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4415AE7C.76F0.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 13 Mar 2006, at 16:40, Jan Beulich wrote: > The compiler isn't required to order the two stores > ptep_get_and_clear_full() in any particular way, and we saw cases > where the upper 32 bits get stored before the lower ones, which causes > the access to fail (page-fault propagated out of > Xen). Jan, Isn't this patch needed for native also? Even though this fastpath is (I think) only called from exit_mmap(), processors may still be running on those pagetables at that point (e.g., due to lazy switching). So what if: 1. Compiler causes high to be cleared before low. 2. This causes an invalid PTE (e.g., pointing into an uncacheable I/O region) 3. A processor speculatively loads the PTE into its TLB 4. A processor speculatively fetches a cacheline from the bogus area 5. You get a bug like the old AMD GART hang, where the CPU writes back the cache line at an inopportune moment, when it should never have been cached in the first place. ?? -- Keir