• L
    x86: get rid of 'rtype' argument to __put_user_goto() macro · 36807856
    Linus Torvalds 提交于
    The 'rtype' argument goes back to pre-git (and pre-BK) times, and comes
    from the fact that we used to not necessarily have the same type sizes
    for the arguments of the inline asm as we did for the actual accesses we
    did.
    
    So 'rtype' is the 'register type' - the override of the register size in
    the inline asm when it doesn't match the actual size of the variable we
    use as the output argument (for when you used "put_user()" on an "int"
    value that was assigned to a byte-sized user space access etc).
    
    That mismatch doesn't actually exist any more, and should probably never
    have existed in the first place.  It's a horrid bug just waiting to
    happen (using more - or less - of the variable that the compiler
    expected us to use).
    
    I think we had some odd casting going on to hide the effects of that
    oddity after-the-fact, but those are long gone, and these days we should
    always have the right size value in the first place, using things like
    
            __typeof__(*(ptr)) __pu_val = (x);
    
    and gcc should thus have the right register size without any manual
    'rtype' games.
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    36807856
uaccess.h 15.5 KB