linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Jinyang He <hejinyang@loongson.cn>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] MIPS: KASLR: Avoid endless loop in sync_icache when synci_step is zero
Date: Mon, 7 Dec 2020 11:32:51 +0100	[thread overview]
Message-ID: <20201207103251.GA15719@alpha.franken.de> (raw)
In-Reply-To: <1607044306-4800-1-git-send-email-hejinyang@loongson.cn>

On Fri, Dec 04, 2020 at 09:11:46AM +0800, Jinyang He wrote:
> Avoid endless loop if synci_step was zero read by rdhwr instruction.
> 
> Most platforms do not need to do synci instruction operations when
> synci_step is 0. But for example, the synci implementation on Loongson64
> platform has some changes. On the one hand, it ensures that the memory
> access instructions have been completed. On the other hand, it guarantees
> that all prefetch instructions need to be fetched again. And its address
> information is useless. Thus, only one synci operation is required when
> synci_step is 0 on Loongson64 platform. I guess that some other platforms
> have similar implementations on synci, so add judgment conditions in
> `while` to ensure that at least all platforms perform synci operations
> once. For those platforms that do not need synci, they just do one more
> operation similar to nop.
> 
> Signed-off-by: Jinyang He <hejinyang@loongson.cn>
> ---
>  arch/mips/kernel/relocate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-next.

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-12-07 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  1:11 [PATCH v2] MIPS: KASLR: Avoid endless loop in sync_icache when synci_step is zero Jinyang He
2020-12-07 10:32 ` 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=20201207103251.GA15719@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=hejinyang@loongson.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).