arm: Zero padding in mcontext_vfp_t in get_vfpcontext().
This can leak kernel stack data otherwise. Reviewed by: imp, markj Sponsored by: The University of Cambridge, Google, Inc. Differential Revision: https://reviews.freebsd.org/D34594
This commit is contained in:
parent
220c48e2d9
commit
b234b8d911
@ -107,6 +107,7 @@ get_vfpcontext(struct thread *td, mcontext_vfp_t *vfp)
|
||||
critical_exit();
|
||||
} else
|
||||
MPASS(TD_IS_SUSPENDED(td));
|
||||
memset(vfp, 0, sizeof(*vfp));
|
||||
memcpy(vfp->mcv_reg, pcb->pcb_vfpstate.reg,
|
||||
sizeof(vfp->mcv_reg));
|
||||
vfp->mcv_fpscr = pcb->pcb_vfpstate.fpscr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user