linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Atish Patra <Atish.Patra@wdc.com>
Cc: "anup@brainfault.org" <anup@brainfault.org>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"david.abdurachmanov@gmail.com" <david.abdurachmanov@gmail.com>,
	"opensbi@lists.infradead.org" <opensbi@lists.infradead.org>,
	"paul.walmsley@sifive.com" <paul.walmsley@sifive.com>
Subject: Re: Random memory corruption with v5.2
Date: Tue, 06 Aug 2019 09:43:51 +0200	[thread overview]
Message-ID: <mvmsgqe3fig.fsf@suse.de> (raw)
In-Reply-To: <45823bccd515273e08bd2e0c634b0b207e60db9c.camel@wdc.com> (Atish Patra's message of "Mon, 5 Aug 2019 22:34:53 +0000")

On Aug 05 2019, Atish Patra <Atish.Patra@wdc.com> wrote:

> On Mon, 2019-08-05 at 16:34 +0200, Andreas Schwab wrote:
>> But this does help:
>> 
>> --- a/arch/riscv/include/asm/tlbflush.h
>> +++ b/arch/riscv/include/asm/tlbflush.h
>> @@ -49,7 +49,7 @@ static inline void remote_sfence_vma(struct cpumask
>> *cmask, unsigned long start,
>>  
>>  	cpumask_clear(&hmask);
>>  	riscv_cpuid_to_hartid_mask(cmask, &hmask);
>> -	sbi_remote_sfence_vma(hmask.bits, start, size);
>> +	sbi_remote_sfence_vma(hmask.bits, 0, -1);
>>  }
>>  
>>  #define flush_tlb_all() sbi_remote_sfence_vma(NULL, 0, -1)
>> 
>
> I am also able to reprduce the issue while doing a install-locales.
> Here is the temporary fix that seems to solve the issue.
>
> diff --git a/arch/riscv/include/asm/tlbflush.h
> b/arch/riscv/include/asm/tlbflush.h
> index 687dd19735a7..29b2bd7c9923 100644
> --- a/arch/riscv/include/asm/tlbflush.h
> +++ b/arch/riscv/include/asm/tlbflush.h
> @@ -55,7 +55,7 @@ static inline void remote_sfence_vma(struct cpumask
> *cmask, unsigned long start,
>  #define flush_tlb_all() sbi_remote_sfence_vma(NULL, 0, -1)
>  #define flush_tlb_page(vma, addr) flush_tlb_range(vma, addr, 0)
>  #define flush_tlb_range(vma, start, end) \
> -       remote_sfence_vma(mm_cpumask((vma)->vm_mm), start, (end) -
> (start))
> +       remote_sfence_vma(mm_cpumask((vma)->vm_mm), 0, -1)
>  #define flush_tlb_mm(mm) \
>         remote_sfence_vma(mm_cpumask(mm), 0, -1)
>
> Can you please verify at your end?

This is equivalent to my patch since all other uses already pass 0,-1.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2019-08-06  7:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 10:51 Random memory corruption with v5.2 Andreas Schwab
2019-07-29 22:58 ` David Abdurachmanov
2019-07-30  4:27   ` Atish Patra
2019-07-30  6:56   ` Andreas Schwab
2019-07-31  0:22     ` Paul Walmsley
2019-07-31  7:39       ` Andreas Schwab
2019-07-31  8:14         ` Anup Patel
2019-08-01 19:57         ` Palmer Dabbelt
2019-07-31 10:19       ` Andreas Schwab
2019-07-31 12:57         ` Troy Benjegerdes
2019-07-31 13:10           ` Andreas Schwab
2019-08-01 18:32       ` Andreas Schwab
2019-08-02  2:00         ` Palmer Dabbelt
2019-08-02  2:15         ` Anup Patel
2019-08-05 14:08           ` Andreas Schwab
2019-08-05 14:34             ` Andreas Schwab
2019-08-05 15:36               ` Andreas Schwab
2019-08-05 22:34               ` Atish Patra
2019-08-06  0:25                 ` Troy Benjegerdes
2019-08-06  0:30                   ` Atish Patra
2019-08-06  6:41                 ` Andreas Schwab
2019-08-06  7:43                 ` Andreas Schwab [this message]
2019-08-02  7:25       ` Paul Walmsley
2019-08-02 12:08         ` Andreas Schwab
2019-08-02 17:32           ` Paul Walmsley
2019-08-05  7:13             ` Andreas Schwab
2019-08-15 20:52     ` Atish Patra
2019-08-16  5:22       ` Atish Patra
2019-08-16 15:38         ` Troy Benjegerdes
2019-08-19 10:53       ` Andreas Schwab

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=mvmsgqe3fig.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=Atish.Patra@wdc.com \
    --cc=anup@brainfault.org \
    --cc=david.abdurachmanov@gmail.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=opensbi@lists.infradead.org \
    --cc=paul.walmsley@sifive.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;
as well as URLs for NNTP newsgroup(s).