From: Lecopzer Chen <lecopzer@gmail.com> To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com Cc: dan.j.williams@intel.com, aryabinin@virtuozzo.com, glider@google.com, dvyukov@google.com, akpm@linux-foundation.org, linux-mediatek@lists.infradead.org, yj.chiang@mediatek.com, Lecopzer Chen <lecopzer@gmail.com>, Lecopzer Chen <lecopzer.chen@mediatek.com> Subject: [PATCH] kasan: fix incorrect arguments passing in kasan_add_zero_shadow Date: Sun, 3 Jan 2021 14:38:47 +0800 [thread overview] Message-ID: <20210103063847.5963-1-lecopzer@gmail.com> (raw) 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@mediatek.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
WARNING: multiple messages have this Message-ID (diff)
From: Lecopzer Chen <lecopzer@gmail.com> To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com Cc: Lecopzer Chen <lecopzer.chen@mediatek.com>, glider@google.com, yj.chiang@mediatek.com, Lecopzer Chen <lecopzer@gmail.com>, linux-mediatek@lists.infradead.org, aryabinin@virtuozzo.com, dan.j.williams@intel.com, akpm@linux-foundation.org, dvyukov@google.com Subject: [PATCH] kasan: fix incorrect arguments passing in kasan_add_zero_shadow Date: Sun, 3 Jan 2021 14:38:47 +0800 [thread overview] Message-ID: <20210103063847.5963-1-lecopzer@gmail.com> (raw) 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@mediatek.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 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
next reply other threads:[~2021-01-03 6:40 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-03 6:38 Lecopzer Chen [this message] 2021-01-03 6:38 ` [PATCH] kasan: fix incorrect arguments passing in kasan_add_zero_shadow Lecopzer Chen 2021-01-08 18:25 ` Andrey Konovalov 2021-01-08 18:25 ` Andrey Konovalov 2021-01-08 18:25 ` Andrey Konovalov
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=20210103063847.5963-1-lecopzer@gmail.com \ --to=lecopzer@gmail.com \ --cc=akpm@linux-foundation.org \ --cc=aryabinin@virtuozzo.com \ --cc=dan.j.williams@intel.com \ --cc=dvyukov@google.com \ --cc=glider@google.com \ --cc=kasan-dev@googlegroups.com \ --cc=lecopzer.chen@mediatek.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=linux-mm@kvack.org \ --cc=yj.chiang@mediatek.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.