Re: [PATCH v4] MIPS: add missing MSACSR and upper MSA initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 01, 2020 at 03:43:15PM +0800, Huacai Chen wrote:
> Hi, all,
> 
> On Tue, Sep 1, 2020 at 2:53 PM Huang Pei <huangpei@xxxxxxxxxxx> wrote:
> >
> > In cc97ab235f ("MIPS: Simplify FP context initialization), init_fp_ctx
> > just initialize the fp/msa context, and own_fp_inatomic just restore
> > FCSR and 64bit FP regs from it, but miss MSACSR and upper MSA regs for
> > MSA, so MSACSR and MSA upper regs's value from previous task on current
> > cpu can leak into current task and cause unpredictable behavior when MSA
> > context not initialized.
> >
> I still think this needs an ACK from Paul Burton.

I'm also curious why Paul removed the init_msa_upper() call in that patch,
but I don't need an explicit ACK from him. I've checked how FPU/MSA
context is setup and to me this patch does the correct thing. IMHO it doesn't
do any harm. So if we find out they are for whatever reason redudant it's
quite easy to revert this patch.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux