Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
s390/fpu: Re-add exception handling in load_fpu_state()
Browse files Browse the repository at this point in the history
With the recent rewrite of the fpu code exception handling for the
lfpc instruction within load_fpu_state() was erroneously removed.

Add it again to prevent that loading invalid floating point register
values cause an unhandled specification exception.

Fixes: 8c09871 ("s390/fpu: limit save and restore to used registers")
Cc: [email protected]
Reported-by: Aristeu Rozanski <[email protected]>
Tested-by: Aristeu Rozanski <[email protected]>
Reviewed-by: Vasily Gorbik <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
  • Loading branch information
hcahca authored and Vasily Gorbik committed Jul 31, 2024
1 parent 8400291 commit 4734406
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void load_fpu_state(struct fpu *state, int flags)
int mask;

if (flags & KERNEL_FPC)
fpu_lfpc(&state->fpc);
fpu_lfpc_safe(&state->fpc);
if (!cpu_has_vx()) {
if (flags & KERNEL_VXR_V0V7)
load_fp_regs_vx(state->vxrs);
Expand Down

0 comments on commit 4734406

Please sign in to comment.