[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200109211452.27369-1-yu-cheng.yu@intel.com>
Date: Thu, 9 Jan 2020 13:14:49 -0800
From: Yu-cheng Yu <yu-cheng.yu@...el.com>
To: linux-kernel@...r.kernel.org, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Tony Luck <tony.luck@...el.com>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Rik van Riel <riel@...riel.com>,
"Ravi V. Shankar" <ravi.v.shankar@...el.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Fenghua Yu <fenghua.yu@...el.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Yu-cheng Yu <yu-cheng.yu@...el.com>
Subject: [PATCH 0/3] Fix two issues in XSAVES offset calculation
This series fixes two issues in XSAVES offset calculation:
- In setup_xstate_features(), supervisor xstate offsets are left as -1's,
but still being tracked as last_good_offset;
- In setup_xstate_comp(), alignments are being added to disabled xstate
offsets.
These issues have not been visible because supervisor xstates have not been
enabled and there is no xfeature requiring alignment. They are triggered
only when adding an aligned non-supervisor xstate after CET [1] supervisor
states.
To detect future potential issues, also add a patch to issue warnings when
checking alignments of disabled xfeatures.
Details are in each patch's commit log.
[1] CET patches:
https://lkml.kernel.org/r/20190813205225.12032-1-yu-cheng.yu@intel.com/
https://lkml.kernel.org/r/20190813205359.12196-1-yu-cheng.yu@intel.com/
Yu-cheng Yu (3):
x86/fpu/xstate: Fix last_good_offset in setup_xstate_features()
x86/fpu/xstate: Fix XSAVES offsets in setup_xstate_comp()
x86/fpu/xstate: WARN_ONCE on checking alignment of disabled xfeatures
arch/x86/kernel/fpu/xstate.c | 61 +++++++++++++++++++-----------------
1 file changed, 32 insertions(+), 29 deletions(-)
--
2.21.0
Powered by blists - more mailing lists