diff options
author | Chang S. Bae <chang.seok.bae@intel.com> | 2024-12-11 04:45:00 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-02-27 21:38:06 +0300 |
commit | dc8aa31a7ac2c4290ea974c13cb0094e08f8948f (patch) | |
tree | d7d8c71f428823c5b4b5162adae12a2ca35d01a4 /drivers/platform/x86/intel/pmt/class.c | |
parent | bd64e9d6aafd12e5437685d2a06360f86418d277 (diff) | |
download | linux-dc8aa31a7ac2c4290ea974c13cb0094e08f8948f.tar.xz |
x86/fpu: Refine and simplify the magic number check during signal return
Before restoring xstate from the user space buffer, the kernel performs
sanity checks on these magic numbers: magic1 in the software reserved
area, and magic2 at the end of XSAVE region.
The position of magic2 is calculated based on the xstate size derived
from the user space buffer. But, the in-kernel record is directly
available and reliable for this purpose.
This reliance on user space data is also inconsistent with the recent
fix in:
d877550eaf2d ("x86/fpu: Stop relying on userspace for info to fault in xsave buffer")
Simply use fpstate->user_size, and then get rid of unnecessary
size-evaluation code.
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/r/20241211014500.3738-1-chang.seok.bae@intel.com
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions