- Reuse some REDZONE bits to keep track of the requested and allocated
sizes, and use that to provide red zones.
- As in UMA, disable memory trashing to avoid unnecessary CPU overhead.
- R10:06a53ecf2400: malloc: Add state transitions for KASAN
For UMA, the region will immediately be marked invalid, so this call isn't really accomplishing anything. Note that in zfree() it is required since we are zeroing the entire allocation, including the redzone.
For kmem_*, the region will be marked valid (for future users of the KVA) and unmapped. I think I added this kasan_mark() call before adding state transitions to kmem_*, so I marked the region valid here. Again, it is not necessary now, but is still needed in the zfree() case.