From: Keir Fraser Subject: Re: [patch] pae: tlbflush linear page table updates Date: Fri, 12 Aug 2005 10:17:41 +0100 Message-ID: <2636b1d92088eaa5eb1c4e84ef120688@cl.cam.ac.uk> References: <571ACEFD467F7749BC50E0A98C17CDD80795993E@pdsmsx403> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <571ACEFD467F7749BC50E0A98C17CDD80795993E@pdsmsx403> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Tian, Kevin" Cc: Gerd Knorr , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 12 Aug 2005, at 10:02, Tian, Kevin wrote: > Is similar fix also required by __put_user_64? No. > #define __put_user_u64(x, addr, retval, errret) \ > ... > : "=r"(retval) \ > : "A" (x), "r" (addr), "i"(errret), "0"(retval)) > > I'm not sure exact rules for compiler to choose registers. But once > compiler optimizes retval or addr to reuse eax/edx under some > condition, > user will also see either incorrect return value, or incorrect content > written to incorrect address. Can we assume such optimization never > happen? The compiler will never alias inputs. In this case it is forced to alias the output constraint with input retval, and so the output cannot alias with any other input (which would be an error). -- Keir