mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
[ARM] vfp: fix leak of VFP_NAN_FLAG into FPSCR
The VFP code can leak VFP_NAN_FLAG into the FPSCR. It doesn't correspond to any real FPSCR bit (and overlaps one of the exception flags). Bug report from Daniel Jacobowitz Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
c7fd84424f
commit
928bd1b470
@ -197,7 +197,7 @@ u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exce
|
|||||||
dd, d, exceptions);
|
dd, d, exceptions);
|
||||||
vfp_put_double(dd, d);
|
vfp_put_double(dd, d);
|
||||||
}
|
}
|
||||||
return exceptions & ~VFP_NAN_FLAG;
|
return exceptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -180,7 +180,7 @@ static u32 vfp_emulate_instruction(u32 inst, u32 fpscr, struct pt_regs *regs)
|
|||||||
* emulate it.
|
* emulate it.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
return exceptions;
|
return exceptions & ~VFP_NAN_FLAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -203,7 +203,7 @@ u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exce
|
|||||||
vfp_put_float(sd, d);
|
vfp_put_float(sd, d);
|
||||||
}
|
}
|
||||||
|
|
||||||
return exceptions & ~VFP_NAN_FLAG;
|
return exceptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user