linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: nylon7@andestech.com
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	kasan-dev@googlegroups.com, aou@eecs.berkeley.edu,
	Paul Walmsley <paul.walmsley@sifive.com>,
	dvyukov@google.com, glider@google.com, aryabinin@virtuozzo.com,
	alankao@andestech.com, nickhu@andestech.com,
	nylon7@andestech.com
Subject: Re: [PATCH 1/1] riscv: Fix KASAN memory mapping.
Date: Wed, 13 Jan 2021 20:57:49 -0800 (PST)	[thread overview]
Message-ID: <mhng-40ebb582-4df3-4189-9521-5446cbe1a9e6@palmerdabbelt-glaptop> (raw)
In-Reply-To: <20210113022410.9057-1-nylon7@andestech.com>

On Tue, 12 Jan 2021 18:24:10 PST (-0800), nylon7@andestech.com wrote:
> From: Nick Hu <nickhu@andestech.com>
>
> Use virtual address instead of physical address when translating
> the address to shadow memory by kasan_mem_to_shadow().
>
> Signed-off-by: Nick Hu <nickhu@andestech.com>
> Signed-off-by: Nylon Chen <nylon7@andestech.com>
> ---
>  arch/riscv/mm/kasan_init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/mm/kasan_init.c b/arch/riscv/mm/kasan_init.c
> index 12ddd1f6bf70..a8a2ffd9114a 100644
> --- a/arch/riscv/mm/kasan_init.c
> +++ b/arch/riscv/mm/kasan_init.c
> @@ -93,8 +93,8 @@ void __init kasan_init(void)
>  								VMALLOC_END));
>
>  	for_each_mem_range(i, &_start, &_end) {
> -		void *start = (void *)_start;
> -		void *end = (void *)_end;
> +		void *start = (void *)__va(_start);
> +		void *end = (void *)__va(_end);
>
>  		if (start >= end)
>  			break;

Thanks, this is on fixes.

      reply	other threads:[~2021-01-14  4:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13  2:24 [PATCH 1/1] riscv: Fix KASAN memory mapping Nylon Chen
2021-01-14  4:57 ` Palmer Dabbelt [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=mhng-40ebb582-4df3-4189-9521-5446cbe1a9e6@palmerdabbelt-glaptop \
    --to=palmer@dabbelt.com \
    --cc=alankao@andestech.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=aryabinin@virtuozzo.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=nickhu@andestech.com \
    --cc=nylon7@andestech.com \
    --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).