As of [1] kmalloc return value is aligned to the size of the allocation for power-of-two kmalloc caches. As KASAN adds just a few bytes of metadata after each object, this results in x2 memory usage increase for such kmalloc caches. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=59bb47985c1db229ccff8c5deebecd54fc77d2a9
This has been resolved for the Software and Hardware Tag-Based modes by moving stack trace handles from per-object metadata to the stack ring [1]. For Generic KASAN, the additional memory usage caused by the over-alignment of kmalloc objects is not that critical, as it introduces a significant memory overhead anyway. Thus, this issue is considered resolved. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ca77f290cff1dfa095d71ae16cc7cda8ee6df495