Messages in this thread | | | Date | Wed, 22 Mar 2023 18:25:25 +0000 | From | "" <> | Subject | Re: [PATCH v5 22/34] x86/fred: FRED initialization code |
| |
On 22/03/2023 2:22 am, Li, Xin3 wrote: >> If there is no other concrete reason other than overflowing for assigning NMI and >> #DB with a stack level > 0, #VE should also be assigned with a stack level > 0, and >> #BP too. #VE can happen anytime and anywhere, so it is subject to overflowing too. > With IDT, both #VE and #BP do not use IST, but NMI, #DB, #MC and #DF do. > > Let's keep this "secret" logic for now, i.e., not change the stack levels > for #VE and #BP at this point. We can do "optimization", i.e., change them > later :).
Fun fact. #BP used to be IST, and used to share the same IST as #DF.
This was spoiled by CVE-2018-8897 and a MovSS-delayed breakpoint over INT3, at which point hardware queued both a #BP and #DB on the same IST stack and lost program state.
There's no need specific need for #BP to be IST to begin with, hence why making it not-IST was the security fix.
~Andrew
| |