diff options
| author | Thomas Gleixner <[email protected]> | 2021-10-15 01:09:37 +0200 |
|---|---|---|
| committer | Borislav Petkov <[email protected]> | 2021-10-22 11:04:46 +0200 |
| commit | daddee24731938781b7876d20335ea3754d23484 (patch) | |
| tree | 813540fbc6ce16fe4cc8ffce5e6fa326c2b12afa /tools/perf/scripts/python/libxed.py | |
| parent | 1c253ff2287fe31307a67938c4487936db967ff5 (diff) | |
x86/fpu: Mop up xfeatures_mask_uabi()
Use the new fpu_user_cfg to retrieve the information instead of
xfeatures_mask_uabi() which will be no longer correct when dynamically
enabled features become available.
Using fpu_user_cfg is appropriate when setting XCOMP_BV in the
init_fpstate since it has space allocated for "max_features". But,
normal fpstates might only have space for default xfeatures. Since
XRSTOR* derives the format of the XSAVE buffer from XCOMP_BV, this can
lead to XRSTOR reading out of bounds.
So when copying actively used fpstate, simply read the XCOMP_BV features
bits directly out of the fpstate instead.
This correction courtesy of Dave Hansen <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions