Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Huang Pei <huangpei@loongson.cn>
Cc: ambrosehua@gmail.com, Li Xuefeng <lixuefeng@loongson.cn>,
	Yang Tiezhu <yangtiezhu@loongson.cn>,
	Gao Juxin <gaojuxin@loongson.cn>,
	Fuxin Zhang <zhangfx@lemote.com>, Huacai Chen <chenhc@lemote.com>,
	linux-mips@vger.kernel.org
Subject: Re: [PATCH v4] MIPS: add missing MSACSR and upper MSA initialization
Date: Thu, 3 Sep 2020 10:16:32 +0200	[thread overview]
Message-ID: <20200903081632.GB6220@alpha.franken.de> (raw)
In-Reply-To: <20200901065309.5952-1-huangpei@loongson.cn>

On Tue, Sep 01, 2020 at 02:53:09PM +0800, Huang Pei 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.
> 
> Fixes: cc97ab235f ("MIPS: Simplify FP context initialization")
> Signed-off-by: Huang Pei <huangpei@loongson.cn>
> ---
>  arch/mips/kernel/traps.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)

applied to mips-fixes.

Thomas.

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

      parent 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
2020-09-03  8:16 ` Thomas Bogendoerfer [this message]

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=20200903081632.GB6220@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=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