[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAeHK+z_+sgoJbi8ULJYKdcNoB9WET8pRbkD7MvK+yp6k5sk4A@mail.gmail.com>
Date: Fri, 8 Jan 2021 19:25:28 +0100
From: Andrey Konovalov <andreyknvl@...gle.com>
To: Lecopzer Chen <lecopzer@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux Memory Management List <linux-mm@...ck.org>,
kasan-dev <kasan-dev@...glegroups.com>,
Dan Williams <dan.j.williams@...el.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-mediatek@...ts.infradead.org, yj.chiang@...iatek.com,
Lecopzer Chen <lecopzer.chen@...iatek.com>
Subject: Re: [PATCH] kasan: fix incorrect arguments passing in kasan_add_zero_shadow
On Sun, Jan 3, 2021 at 7:39 AM Lecopzer Chen <lecopzer@...il.com> wrote:
>
> kasan_remove_zero_shadow() shall use original virtual address, start
> and size, instead of shadow address.
>
> Fixes: 0207df4fa1a86 ("kernel/memremap, kasan: make ZONE_DEVICE with work with KASAN")
> Signed-off-by: Lecopzer Chen <lecopzer.chen@...iatek.com>
> ---
> mm/kasan/init.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/kasan/init.c b/mm/kasan/init.c
> index bc0ad208b3a7..67051cfae41c 100644
> --- a/mm/kasan/init.c
> +++ b/mm/kasan/init.c
> @@ -481,7 +481,6 @@ int kasan_add_zero_shadow(void *start, unsigned long size)
>
> ret = kasan_populate_early_shadow(shadow_start, shadow_end);
> if (ret)
> - kasan_remove_zero_shadow(shadow_start,
> - size >> KASAN_SHADOW_SCALE_SHIFT);
> + kasan_remove_zero_shadow(start, size);
> return ret;
> }
> --
> 2.25.1
Reviewed-by: Andrey Konovalov <andreyknvl@...gle.com>
Powered by blists - more mailing lists