aboutsummaryrefslogtreecommitdiffstats
path: root/samples/rust/rust_driver_platform.rs
diff options
context:
space:
mode:
authorChang S. Bae <[email protected]>2024-12-11 01:45:00 +0000
committerIngo Molnar <[email protected]>2025-02-27 18:38:06 +0000
commitdc8aa31a7ac2c4290ea974c13cb0094e08f8948f (patch)
treed7d8c71f428823c5b4b5162adae12a2ca35d01a4 /samples/rust/rust_driver_platform.rs
parentselftests/x86/xstate: Fix spelling mistake "hader" -> "header" (diff)
downloadkernel-dc8aa31a7ac2c4290ea974c13cb0094e08f8948f.tar.gz
kernel-dc8aa31a7ac2c4290ea974c13cb0094e08f8948f.zip
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 <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Dave Hansen <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'samples/rust/rust_driver_platform.rs')
0 files changed, 0 insertions, 0 deletions