[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzR1/nWoQtdRQ3Uv@zn.tnic>
Date: Wed, 28 Sep 2022 18:27:42 +0200
From: Borislav Petkov <bp@...en8.de>
To: Andrew Cooper <andrew.cooper3@...rix.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
Marek Marczykowski-Górecki
<marmarek@...isiblethingslab.com>
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@...rix.com>
> ---
> CC: Thomas Gleixner <tglx@...utronix.de>
> CC: Ingo Molnar <mingo@...hat.com>
> CC: Borislav Petkov <bp@...en8.de>
> CC: Dave Hansen <dave.hansen@...ux.intel.com>
> CC: x86@...nel.org
> CC: Marek Marczykowski-Górecki <marmarek@...isiblethingslab.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
Powered by blists - more mailing lists