• Dave Martin's avatar
    arm64: ptrace: Fix incorrect get_user() use in compat_vfp_set() · 5fbd5fc4
    Dave Martin authored
    Now that compat_vfp_get() uses the regset API to copy the FPSCR
    value out to userspace, compat_vfp_set() looks inconsistent.  In
    particular, compat_vfp_set() will fail if called with kbuf != NULL
    && ubuf == NULL (which is valid usage according to the regset API).
    
    This patch fixes compat_vfp_set() to use user_regset_copyin(),
    similarly to compat_vfp_get().
    
    This also squashes a sparse warning triggered by the cast that
    drops __user when calling get_user().
    Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    5fbd5fc4
ptrace.c 34.5 KB