From: Yu-cheng Yu <yu-cheng.yu@intel.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Tony Luck <tony.luck@intel.com>,
Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
Rik van Riel <riel@surriel.com>,
"Ravi V. Shankar" <ravi.v.shankar@intel.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Fenghua Yu <fenghua.yu@intel.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: Yu-cheng Yu <yu-cheng.yu@intel.com>
Subject: [PATCH v2 0/3] Fix small issues in XSAVES
Date: Thu, 12 Dec 2019 13:08:52 -0800 [thread overview]
Message-ID: <20191212210855.19260-1-yu-cheng.yu@intel.com> (raw)
Rebase v1 to Linux v5.5-rc1. This supersedes the previous version, but
does not have any functional changes.
The first two patches in this series are split from my supervisor xstate
patches [2]. The third is to fix a vital issue in __fpu_restore_sig(),
and more RFC than the others. All three are not directly related to
supervisor xstates or CET, split them out and submit first. I will
re-submit supervisor xstate patches shortly.
When__fpu_restore_sig() fails, partially cleared FPU registers still belong
to the previous owner task. That causes that task to use corrupted xregs.
Fix it by doing __cpu_invalidate_fpregs_state() in functions that copy into
fpregs. Further details are in the commit log of patch #3.
[1] v1 of this series:
https://lkml.kernel.org/r/20191205182648.32257-1-yu-cheng.yu@intel.com/
[2] Support XSAVES supervisor states
https://lkml.kernel.org/r/20190925151022.21688-1-yu-cheng.yu@intel.com/
[3] 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 small issues before adding supervisor xstates
x86/fpu/xstate: Make xfeature_is_supervisor()/xfeature_is_user()
return bool
x86/fpu/xstate: Invalidate fpregs when __fpu_restore_sig() fails
arch/x86/include/asm/fpu/internal.h | 14 ++++++++++++++
arch/x86/kernel/fpu/core.c | 16 ++++++++++++++--
arch/x86/kernel/fpu/xstate.c | 18 ++++++++----------
3 files changed, 36 insertions(+), 12 deletions(-)
--
2.17.1
next reply other threads:[~2019-12-12 21:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 21:08 Yu-cheng Yu [this message]
2019-12-12 21:08 ` [PATCH v2 1/3] x86/fpu/xstate: Fix small issues before adding supervisor xstates Yu-cheng Yu
2019-12-20 20:19 ` Sebastian Andrzej Siewior
2020-01-06 18:15 ` [tip: x86/fpu] x86/fpu/xstate: Fix small issues tip-bot2 for Yu-cheng Yu
2019-12-12 21:08 ` [PATCH v2 2/3] x86/fpu/xstate: Make xfeature_is_supervisor()/xfeature_is_user() return bool Yu-cheng Yu
2019-12-20 20:19 ` Sebastian Andrzej Siewior
2019-12-20 20:33 ` Yu-cheng Yu
2020-01-06 18:15 ` [tip: x86/fpu] " tip-bot2 for Yu-cheng Yu
2019-12-12 21:08 ` [PATCH v2 3/3] x86/fpu/xstate: Invalidate fpregs when __fpu_restore_sig() fails Yu-cheng Yu
2019-12-18 15:54 ` Sebastian Andrzej Siewior
2019-12-18 20:53 ` Yu-cheng Yu
2019-12-19 14:22 ` Sebastian Andrzej Siewior
2019-12-19 16:44 ` Yu-cheng Yu
2019-12-19 17:16 ` Sebastian Andrzej Siewior
2019-12-19 17:40 ` Yu-cheng Yu
2019-12-20 19:59 ` [PATCH] x86/fpu: Deacticate FPU state after failure during state load Sebastian Andrzej Siewior
2020-01-07 12:52 ` [tip: x86/fpu] x86/fpu: Deactivate " tip-bot2 for Sebastian Andrzej Siewior
2020-01-07 20:41 ` Andy Lutomirski
2020-01-07 20:38 ` Yu-cheng Yu
2020-01-07 21:11 ` Sebastian Andrzej Siewior
2020-01-08 11:45 ` Borislav Petkov
2020-01-08 11:46 ` Borislav Petkov
2019-12-20 20:16 ` [PATCH v2 3/3] x86/fpu/xstate: Invalidate fpregs when __fpu_restore_sig() fails Sebastian Andrzej Siewior
2019-12-20 20:32 ` Yu-cheng Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191212210855.19260-1-yu-cheng.yu@intel.com \
--to=yu-cheng.yu@intel.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=ravi.v.shankar@intel.com \
--cc=riel@surriel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).