Messages in this thread | | | Date | Wed, 28 Sep 2022 18:27:42 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH] x86/fpu/xstate: Fix XSTATE_WARN_ON() to emit relevant diagnostics |
| |
On Wed, Aug 10, 2022 at 11:19:09PM +0100, Andrew Cooper wrote: > "XSAVE consistency problem" has been reported under Xen, but that's the extent > of my divination skills. > > Modify XSTATE_WARN_ON() to force the caller to provide relevant diagnostic > information, and modify each caller suitably. > > For check_xstate_against_struct(), this removes a double WARN() where one will > do perfectly fine. > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> > --- > CC: Thomas Gleixner <tglx@linutronix.de> > CC: Ingo Molnar <mingo@redhat.com> > CC: Borislav Petkov <bp@alien8.de> > CC: Dave Hansen <dave.hansen@linux.intel.com> > CC: x86@kernel.org > CC: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> > > RFC: CC stable? This has been wonky debugging for 7 years. > > Apparently "size 832 != kernel_size 0" so let the debugging continue...
I've got a similar bug report from people running Linux guest on some other prop. HV. And I wanted to give them a debugging patch which dumps *all* the relevant data along the path of paranoid_xstate_size_valid(), the loop in there and xstate_calculate_size().
Looking how you might need something like that too, how about you extend your patch to do that and have it being toggled on by a xstate=debug cmdline?
It feels like this would be a useful thing to have with the gazillion of XSTATE features and dynamic buffer allocation...
Thx.
-- Regards/Gruss, Boris.
https://people.kernel.org/tglx/notes-about-netiquette
| |