kasan, slab: make freelist stored without tags

Linux Kernel / Linux Kernel - Andrey Konovalov [google.com] - 21 February 2019 17:01 EST

Similarly to "kasan, slub: move kasan_poison_slab hook before page_address", move kasan_poison_slab() before alloc_slabmgmt(), which calls page_address(), to make page_address() return value to be non-tagged. This, combined with calling kasan_reset_tag() for off-slab slab management object, leads to freelist being stored non-tagged.

Link: http://lkml.kernel.org/r/dfb53b44a4d00de3879a05a9f04c1f55e584f7a1.1550602886.git.andreyknvl@google.com

51dedad06b5f kasan, slab: make freelist stored without tags
mm/slab.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

Upstream: git.kernel.org

  • Share