summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2026-09-25 16:24:52 +0000
committerBorislav Petkov (AMD) <bp@alien8.de>2026-09-25 12:26:05 -0700
commitfd14edd82077b8655273b6d32503903a2ee35ffd (patch)
tree76bc31515a15c800286016c72293dd2fbcd6108e /tools/perf/scripts/python/bin
parentf1751b220bc8a9bd2dc38ecf61f5c29f3826ace0 (diff)
x86/fpu: Pre-fault only required size of xstate buffer
The kernel previously used the default task FPU state size (user_size) to fault in the user buffer when restoring FPU registers from a signal frame. This can lead to attempting to fault in memory past the end of the actual frame if the frame was smaller than the default size. Introduce consistency checks to calculate the actual required size for the features enabled in the xfeatures mask, ensure that the provided xstate_size is sufficient, and shrink it to the actual required size. Use this validated size to fault in the user buffer. Keep the strict check that the provided xstate_size does not exceed the default user_size for now. Signed-off-by: Andrei Vagin <avagin@google.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Alexander Mikhalitsyn <alexander@mihalicyn.com> Reviewed-by: Chang S. Bae <chang.seok.bae@intel.com> Link: https://patch.msgid.link/20260925162454.1403405-7-avagin@google.com
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions