|
@@ -894,7 +894,7 @@ static int compat_vfp_get(struct task_struct *target,
|
|
|
{
|
|
{
|
|
|
struct user_fpsimd_state *uregs;
|
|
struct user_fpsimd_state *uregs;
|
|
|
compat_ulong_t fpscr;
|
|
compat_ulong_t fpscr;
|
|
|
- int ret;
|
|
|
|
|
|
|
+ int ret, vregs_end_pos;
|
|
|
|
|
|
|
|
uregs = &target->thread.fpsimd_state.user_fpsimd;
|
|
uregs = &target->thread.fpsimd_state.user_fpsimd;
|
|
|
|
|
|
|
@@ -902,13 +902,16 @@ static int compat_vfp_get(struct task_struct *target,
|
|
|
* The VFP registers are packed into the fpsimd_state, so they all sit
|
|
* The VFP registers are packed into the fpsimd_state, so they all sit
|
|
|
* nicely together for us. We just need to create the fpscr separately.
|
|
* nicely together for us. We just need to create the fpscr separately.
|
|
|
*/
|
|
*/
|
|
|
- ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, uregs, 0,
|
|
|
|
|
- VFP_STATE_SIZE - sizeof(compat_ulong_t));
|
|
|
|
|
|
|
+ vregs_end_pos = VFP_STATE_SIZE - sizeof(compat_ulong_t);
|
|
|
|
|
+ ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, uregs,
|
|
|
|
|
+ 0, vregs_end_pos);
|
|
|
|
|
|
|
|
if (count && !ret) {
|
|
if (count && !ret) {
|
|
|
fpscr = (uregs->fpsr & VFP_FPSCR_STAT_MASK) |
|
|
fpscr = (uregs->fpsr & VFP_FPSCR_STAT_MASK) |
|
|
|
(uregs->fpcr & VFP_FPSCR_CTRL_MASK);
|
|
(uregs->fpcr & VFP_FPSCR_CTRL_MASK);
|
|
|
- ret = put_user(fpscr, (compat_ulong_t *)ubuf);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, &fpscr,
|
|
|
|
|
+ vregs_end_pos, VFP_STATE_SIZE);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
return ret;
|