From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: x86@kernel.org, Linus Torvalds <torvalds@linux-foundation.org>,
Tom Lendacky <thomas.lendacky@amd.com>, Pu Wen <puwen@hygon.cn>,
Stephen Hemminger <sthemmin@microsoft.com>,
Sasha Levin <alexander.levin@microsoft.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Dirk Hohndel <dirkhh@vmware.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Asit Mallick <asit.k.mallick@intel.com>,
Gordon Tetlow <gordon@tetlows.org>,
David Kaplan <David.Kaplan@amd.com>,
Tony Luck <tony.luck@intel.com>
Subject: [RFD] x86: Curing the exception and syscall trainwreck in hardware
Date: Mon, 24 Aug 2020 14:24:48 +0200 [thread overview]
Message-ID: <875z98jkof.fsf@nanos.tec.linutronix.de> (raw)
It's a sad state of affairs that I have to write this mail at all and it's
nothing else than an act of desperation.
The x86 exception handling including the various ways of syscall entry/exit
are a constant source of trouble. Aside of being a functional disaster
quite some of these issues have severe security implications.
There are similar issues on the virtualization side including the handling
of essential MSRs which are required to run a guest OS and even more so
with the upcoming virt specific exceptions of various vendors.
We are asking the vendors for more than a decade to fix this situation, but
even the most trivial requests like an IRET variant which does not reenable
NMIs unconditionally and other small things which would make our life less
miserable aren't happening.
Instead of fixing the underlying design fails first and creating a solid
base the vendors add even more ill defined exception variants on top of
the existing pile. Unsurprisingly these add-ons are creating more
problems than they solve, but being based on the existing house of cards
that's obviously expected.
This really has to stop and the underlying issues have to be resolved
before more problems are inflicted upon operating systems and hypervisors.
The amount of code to workaround these issues is already by far larger than
the actual functional code. Some of these workarounds are just bandaids
which try to prevent the most obvious damage, but they are mostly based on
the hope that the unfixable corner cases never happen.
There is talk about solutions for years, but it's just talk and we have not
yet seen a coordinated effort accross the x86 vendors to come up with a
sane replacement for the x86 exception and syscall trainwreck.
The important word here is 'coordinated'. We are not at all interested
in different solutions from different vendors. It's going to be
challenging enough to maintain ONE parallel exception/syscall handling
implementation. In other words, the kernel is going to support exactly
ONE new exception/syscall handling mechanism and not going to accomodate
every vendor.
So I call on the x86 vendors to sit together and come up with a unified
and consolidated base on which each of the vendors can build their
differentiating features.
Aside of coordination between the x86 vendors this also requires
coordination with the people who finally have to deal with that on the
software side. The prevailing hardware engineering principle "That can
be fixed in software" does not work; it never worked - especially not in
the area of x86 exception and syscall handling.
This coordination must include all major operating systems and hypervisors
whether open source or proprietary to ensure that the different
requirements are met. This kind of coordination has happened in the context
of the hardware vulnerability mitigations already in a fruitful way so
this request is not asking for something impossible.
If the x86 vendors are unable to talk to each other and coordinate on a
solution, then the ultimate backstop might be to take the first reasonable
design specification and the first reasonable silicon implementation of it
as the ONE alternative solution to the existing trainwreck. How the other
vendors are going to deal with that is none of our business. That's the
least useful and least desired outcome and will only happen when the x86
vendors are not able to get their act together and sort that out upfront.
Thanks,
Thomas
next reply other threads:[~2020-08-24 12:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 12:24 Thomas Gleixner [this message]
2020-08-24 13:52 ` [RFD] x86: Curing the exception and syscall trainwreck in hardware Andrew Cooper
2020-08-25 4:39 ` TDX #VE in SYSCALL gap (was: [RFD] x86: Curing the exception and syscall trainwreck in hardware) Sean Christopherson
2020-08-25 15:25 ` Dave Hansen
2020-08-25 16:49 ` Andy Lutomirski
2020-08-25 17:19 ` Sean Christopherson
2020-08-25 17:28 ` Andy Lutomirski
2020-08-25 17:35 ` Luck, Tony
2020-08-25 17:41 ` Andy Lutomirski
2020-08-25 17:59 ` Andrew Cooper
2020-08-25 18:38 ` Dave Hansen
2020-08-25 19:49 ` Thomas Gleixner
2020-08-26 19:16 ` Sean Christopherson
2020-08-30 15:37 ` Andy Lutomirski
2020-08-30 18:37 ` Linus Torvalds
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=875z98jkof.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=David.Kaplan@amd.com \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=alexander.levin@microsoft.com \
--cc=andrew.cooper3@citrix.com \
--cc=asit.k.mallick@intel.com \
--cc=dirkhh@vmware.com \
--cc=gordon@tetlows.org \
--cc=hpa@linux.intel.com \
--cc=jan.kiszka@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=puwen@hygon.cn \
--cc=sthemmin@microsoft.com \
--cc=thomas.lendacky@amd.com \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
--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