[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [patch] pae: tlbflush linear page table updates




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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.