[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9Jb+gBha3kgJ=Vgzh73EYXh22-UuXctZt2c6GftQq3rFUgXQ@mail.gmail.com>
Date: Thu, 20 Jul 2023 11:14:08 +0200
From: Pankaj Gupta <pankaj.gupta.linux@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Sean Christopherson <seanjc@...gle.com>,
Weijiang Yang <weijiang.yang@...el.com>, pbonzini@...hat.com,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org, rppt@...nel.org,
binbin.wu@...ux.intel.com, rick.p.edgecombe@...el.com,
john.allen@....com, Chao Gao <chao.gao@...el.com>,
Andrew Cooper <Andrew.Cooper3@...rix.com>
Subject: Re: [PATCH v3 00/21] Enable CET Virtualization
> > > Trying to understand more what prevents SSS to enable in pre FRED, Is
> > > it better #CP exception
> > > handling with other nested exceptions?
> >
> > SSS took the syscall gap and made it worse -- as in *way* worse.
> >
> > To top it off, the whole SSS busy bit thing is fundamentally
> > incompatible with how we manage to survive nested exceptions in NMI
> > context.
> >
> > Basically, the whole x86 exception / stack switching logic was already
> > borderline impossible (consider taking an MCE in the early NMI path
> > where we set up, but have not finished, the re-entrancy stuff), and
>
> SSS
>
> > pushed it over the edge and set it on fire.
ah I see. SSS takes it to the next level.
> >
> > And NMI isn't the only problem, the various new virt exceptions #VC and
> > #HV are on their own already near impossible, adding SSS again pushes
> > the whole thing into clear insanity.
> >
> > There's a good exposition of the whole trainwreck by Andrew here:
> >
> > https://www.youtube.com/watch?v=qcORS8CN0ow
> >
> > (that is, sorry for the youtube link, but Google is failing me in
> > finding the actual Google Doc that talk is based on, or even the slide
> > deck :/)
I think I got the link:
https://docs.google.com/document/d/1hWejnyDkjRRAW-JEsRjA5c9CKLOPc6VKJQsuvODlQEI/edit?pli=1
> >
> >
> >
> > FRED solves all that by:
> >
> > - removing the stack gap, cc/ip/ss/sp/ssp/gs will all be switched
> > atomically and consistently for every transition.
> >
> > - removing the non-reentrant IST mechanism and replacing it with stack
> > levels
> >
> > - adding an explicit NMI latch
> >
> > - re-organising the actual shadow stacks and doing away with that busy
> > bit thing (I need to re-read the FRED spec on this detail again).
> >
Thank you for explaining. I will also study the FRED spec and
corresponding kernel
patches posted in the mailing list.
> >
> >
> > Crazy as we are, we're not touching legacy/IDT SSS with a ten foot pole,
> > sorry.
ya, interesting.
Best regards,
Pankaj
Powered by blists - more mailing lists