[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANaxB-wFSTO+CCv2wCZb3JXwo1j8okiR2qAOMYcOiL8mn6WaTw@mail.gmail.com>
Date:   Fri, 5 Aug 2022 05:12:23 -0700
From:   Andrei Vagin <avagin@...il.com>
To:     "Chang S. Bae" <chang.seok.bae@...el.com>
Cc:     Dave Hansen <dave.hansen@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Yu-cheng Yu <yu-cheng.yu@...el.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Borislav Petkov <bp@...e.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Megha Dey <megha.dey@...ux.intel.com>,
        Oliver Sang <oliver.sang@...el.com>
Subject: Re: [patch V4 09/65] x86/fpu: Sanitize xstateregs_set()
On Thu, Jul 28, 2022 at 4:32 PM Chang S. Bae <chang.seok.bae@...el.com> wrote:
>
> On 7/25/2022 2:26 PM, Dave Hansen wrote:
> >
> > Do you happen to have a quick reproducer for this, or at least the
> > contents of the buffer that you are trying to restore?
>
> While not following this report, I think there is a regression along
> with the changes:
>
> As looking into the spec, this state load does not depend on XSTATE_BV:
>
>       RFBM := XCR0 AND EDX:EAX;
>       COMPMASK := XCOMP_BV field from XSAVE header;
>
>       IF COMPMASK[63] = 0
>           THEN
>           ...
>           IF RFBM[1] = 1 OR RFBM[2] = 1
>               THEN load MXCSR from legacy region of XSAVE area;
>           FI;
>           ...
>       ELSE
>       ...
>
> But our upstream code does reference XSTATE_BV instead of RFBM [1,2].
>
> My test case [3] fails with the upstream but works with 5.13, which is
> before the series. Then, this change looks to make it work at least for it:
gVisor test passes with this change too. Chang, are you going to send a patch?
Thanks,
Andrei
Powered by blists - more mailing lists
 
