Re: [PATCH v2 00/13] objtool: Detect and warn about indirect calls in __nocfi functions
From: Peter Zijlstra
Date: Fri May 02 2025 - 04:42:40 EST
On Thu, May 01, 2025 at 11:30:18AM -0700, Sean Christopherson wrote:
> Uh, aren't you making this way more complex than it needs to be?
Possibly :-)
> IIUC, KVM never
> uses the FRED hardware entry points, i.e. the FRED entry tables don't need to be
> in place because they'll never be used. The only bits of code KVM needs is the
> __fred_entry_from_kvm() glue.
But __fred_entry_from_kvm() calls into fred_extint(), which then
directly uses the fred sysvec_table[] for dispatch. How would we not
have to set up that table?
> Lightly tested, but this combo works for IRQs and NMIs on non-FRED hardware.
So the FRED NMI code is significantly different from the IDT NMI code
and I really didn't want to go mixing those.
If we get a nested NMI I don't think it'll behave well.