• Daniel Thompson's avatar
    ARM: 8091/2: add get_user() support for 8 byte types · e38361d0
    Daniel Thompson authored
    Recent contributions, including to DRM and binder, introduce 64-bit
    values in their interfaces. A common motivation for this is to allow
    the same ABI for 32- and 64-bit userspaces (and therefore also a shared
    ABI for 32/64 hybrid userspaces). Anyhow, the developers would like to
    avoid gotchas like having to use copy_from_user().
    
    This feature is already implemented on x86-32 and the majority of other
    32-bit architectures. The current list of get_user_8 hold out
    architectures are: arm, avr32, blackfin, m32r, metag, microblaze,
    mn10300, sh.
    
    Credit:
    
        My name sits rather uneasily at the top of this patch. The v1 and
        v2 versions of the patch were written by Rob Clark and to produce v4
        I mostly copied code from Russell King and H. Peter Anvin. However I
        have mangled the patch sufficiently that *blame* is rightfully mine
        even if credit should more widely shared.
    
    Changelog:
    
    v5: updated to use the ret macro (requested by Russell King)
    v4: remove an inlined add on big endian systems (spotted by Russell King),
        used __ARMEB__ rather than BIG_ENDIAN (to match rest of file),
        cleared r3 on EFAULT during __get_user_8.
    v3: fix a couple of checkpatch issues
    v2: pass correct size to check_uaccess, and better handling of narrowing
        double word read with __get_user_xb() (Russell King's suggestion)
    v1: original
    Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
    Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    e38361d0
getuser.S 2.44 KB