Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Huacai Chen <chenhc@lemote.com>
Cc: Huang Pei <huangpei@loongson.cn>,
	Paul Burton <paulburton@kernel.org>,
	Paul Ambrose <ambrosehua@gmail.com>,
	Li Xuefeng <lixuefeng@loongson.cn>,
	Yang Tiezhu <yangtiezhu@loongson.cn>,
	Gao Juxin <gaojuxin@loongson.cn>,
	Fuxin Zhang <zhangfx@lemote.com>,
	"open list:MIPS" <linux-mips@vger.kernel.org>
Subject: Re: [PATCH v4] MIPS: add missing MSACSR and upper MSA initialization
Date: Thu, 3 Sep 2020 10:20:04 +0200	[thread overview]
Message-ID: <20200903082003.GC6220@alpha.franken.de> (raw)
In-Reply-To: <CAAhV-H4ZzPD46OBrKhO-9UaJT-eyZooTarsLj_-h-tNGWfa5gQ@mail.gmail.com>

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@loongson.cn> 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 ]

  reply	other threads:[~2020-09-03  8:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01  6:53 [PATCH v4] MIPS: add missing MSACSR and upper MSA initialization Huang Pei
2020-09-01  7:43 ` Huacai Chen
2020-09-03  8:20   ` Thomas Bogendoerfer [this message]
2020-09-03  8:16 ` Thomas Bogendoerfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200903082003.GC6220@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=ambrosehua@gmail.com \
    --cc=chenhc@lemote.com \
    --cc=gaojuxin@loongson.cn \
    --cc=huangpei@loongson.cn \
    --cc=linux-mips@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=paulburton@kernel.org \
    --cc=yangtiezhu@loongson.cn \
    --cc=zhangfx@lemote.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox