Skip to content

Commit 9ba589f

Browse files
KAGA-KOKOsuryasaimadhu
authored andcommitted
x86/fpu/signal: Remove the legacy alignment check
Checking for the XSTATE buffer being 64-byte aligned, and if not, deciding just to restore the FXSR state is daft. If user space provides an unaligned math frame and has the extended state magic set in the FX software reserved bytes, then it really can keep the pieces. If the frame is unaligned and the FX software magic is not set, then fx_only is already set and the restore will use fxrstor. Remove it. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 99a5901 commit 9ba589f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

arch/x86/kernel/fpu/signal.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,6 @@ static int __fpu_restore_sig(void __user *buf, void __user *buf_fx,
306306
}
307307
}
308308

309-
if ((unsigned long)buf_fx % 64)
310-
fx_only = 1;
311-
312309
if (!ia32_fxstate) {
313310
/*
314311
* Attempt to restore the FPU registers directly from user

0 commit comments

Comments
 (0)