Commit b75b6c1b authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Lin Wang
Browse files

x86/fpu/xstate: Consolidate size calculations

mainline inclusion
from mainline-v5.18-rc1
commit d6d6d50f
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I73H0T
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d6d6d50f1e801a790a242c80eeda261e36c43b7b



Intel-SIG: commit d6d6d50f x86/fpu/xstate: Consolidate size calculations.

--------------------------------

Use the offset calculation to do the size calculation which avoids yet
another series of CPUID instructions for each invocation.

  [ Fix the FP/SSE only case which missed to take the xstate
    header into account, as
    Reported-by: kernel test robot <oliver.sang@intel.com> ]

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/87o81pgbp2.ffs@tglx


Signed-off-by: default avatarLin Wang <lin.x.wang@intel.com>
parent 26cef904
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment