Re: [PATCH v5 17/37] mm: slub: Disable KMSAN when checking the padding bytes

2024-06-20 Thread Alexander Potapenko
On Wed, Jun 19, 2024 at 5:45 PM Ilya Leoshkevich wrote: > > Even though the KMSAN warnings generated by memchr_inv() are suppressed > by metadata_access_enable(), its return value may still be poisoned. > > The reason is that the last iteration of memchr_inv() returns > `*start != value ? start :

[PATCH v5 17/37] mm: slub: Disable KMSAN when checking the padding bytes

2024-06-19 Thread Ilya Leoshkevich
Even though the KMSAN warnings generated by memchr_inv() are suppressed by metadata_access_enable(), its return value may still be poisoned. The reason is that the last iteration of memchr_inv() returns `*start != value ? start : NULL`, where *start is poisoned. Because of this, somewhat