Re: [PATCH v5 13/37] kmsan: Support SLAB_POISON

2024-06-20 Thread Alexander Potapenko
On Wed, Jun 19, 2024 at 5:45 PM Ilya Leoshkevich wrote: > > Avoid false KMSAN negatives with SLUB_DEBUG by allowing > kmsan_slab_free() to poison the freed memory, and by preventing > init_object() from unpoisoning new allocations by using __memset(). > > There are two alternatives to this

[PATCH v5 13/37] kmsan: Support SLAB_POISON

2024-06-19 Thread Ilya Leoshkevich
Avoid false KMSAN negatives with SLUB_DEBUG by allowing kmsan_slab_free() to poison the freed memory, and by preventing init_object() from unpoisoning new allocations by using __memset(). There are two alternatives to this approach. First, init_object() can be marked with __no_sanitize_memory.