Re: [PATCH RFC v2 16/21] kasan: optimize poisoning in kmalloc and krealloc

2020-11-02 Thread Andrey Konovalov
On Wed, Oct 28, 2020 at 5:55 PM Dmitry Vyukov wrote: > > On Thu, Oct 22, 2020 at 3:20 PM Andrey Konovalov > wrote: > > > > Since kasan_kmalloc() always follows kasan_slab_alloc(), there's no need > > to reunpoison the object data, only to poison the redzone. > > > > This requires changing kasan

Re: [PATCH RFC v2 16/21] kasan: optimize poisoning in kmalloc and krealloc

2020-10-28 Thread Dmitry Vyukov
On Thu, Oct 22, 2020 at 3:20 PM Andrey Konovalov wrote: > > Since kasan_kmalloc() always follows kasan_slab_alloc(), there's no need > to reunpoison the object data, only to poison the redzone. > > This requires changing kasan annotation for early SLUB cache to > kasan_slab_alloc(). Otherwise kasa

[PATCH RFC v2 16/21] kasan: optimize poisoning in kmalloc and krealloc

2020-10-22 Thread Andrey Konovalov
Since kasan_kmalloc() always follows kasan_slab_alloc(), there's no need to reunpoison the object data, only to poison the redzone. This requires changing kasan annotation for early SLUB cache to kasan_slab_alloc(). Otherwise kasan_kmalloc() doesn't untag the object. This doesn't do any functional