Re: [PATCH 03/12] kasan: optimize large kmalloc poisoning

2021-02-02 Thread Marco Elver
On Mon, Feb 01, 2021 at 08:43PM +0100, Andrey Konovalov wrote: > Similarly to kasan_kmalloc(), kasan_kmalloc_large() doesn't need > to unpoison the object as it as already unpoisoned by alloc_pages() > (or by ksize() for krealloc()). > > This patch changes kasan_kmalloc_large() to only poison the

[PATCH 03/12] kasan: optimize large kmalloc poisoning

2021-02-01 Thread Andrey Konovalov
Similarly to kasan_kmalloc(), kasan_kmalloc_large() doesn't need to unpoison the object as it as already unpoisoned by alloc_pages() (or by ksize() for krealloc()). This patch changes kasan_kmalloc_large() to only poison the redzone. Signed-off-by: Andrey Konovalov --- mm/kasan/common.c | 20 ++