]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
uma: Fix a few problems with KASAN integration
authorMark Johnston <markj@FreeBSD.org>
Sat, 10 Jul 2021 00:38:21 +0000 (20:38 -0400)
committerMark Johnston <markj@FreeBSD.org>
Sat, 10 Jul 2021 00:38:50 +0000 (20:38 -0400)
commitb0dfc48684780024a3d736c5a5449284dad97f4e
tree0bb1644b9e56bc12f28192d1715b6bacf3ae910b
parent36226163fa48ee2c5f73bd2e870ce2e5a057f42e
uma: Fix a few problems with KASAN integration

- Ensure that all items returned by UMA are aligned to
  KASAN_SHADOW_SCALE (8).  This was true in practice since smaller
  alignments are not used by any consumers, but we should enforce it
  anyway.
- Use a non-zero code for marking redzones that appear naturally in
  items that are not a multiple of the scale factor in size.  Currently
  we do not modify keg layouts to force the creation of redzones.
- Use a non-zero code for marking freed per-CPU items, otherwise
  accesses of freed per-CPU items are not detected by the runtime.

Sponsored by: The FreeBSD Foundation
sys/vm/uma_core.c