Chang S. Bae d3e021adac x86/fpu: Fix the init_fpstate size check with the actual size
The init_fpstate buffer is statically allocated. Thus, the sanity test was
established to check whether the pre-allocated buffer is enough for the
calculated size or not.

The currently measured size is not strictly relevant. Fix to validate the
calculated init_fpstate size with the pre-allocated area.

Also, replace the sanity check function with open code for clarity. The
abstraction itself and the function naming do not tend to represent simply
what it does.

Fixes: 2ae996e0c1a3 ("x86/fpu: Calculate the default sizes independently")
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20220824191223.1248-3-chang.seok.bae@intel.com
2022-10-17 15:44:25 +02:00
..
2022-10-10 09:27:46 -07:00
2022-04-11 18:04:27 +02:00
2022-10-11 20:07:44 -07:00
2022-04-14 14:09:43 +02:00
2022-10-04 13:38:03 -07:00
2022-10-09 08:56:54 -07:00
2022-09-26 10:13:16 -07:00
2022-10-12 14:39:38 -07:00
2022-07-25 10:32:32 +02:00
2021-12-11 09:09:45 +01:00
2022-10-10 12:00:45 -07:00