Linux/linux a2f7757mm kmemleak.c slab.h

kmemleak: account for tagged pointers when calculating pointer range

kmemleak keeps two global variables, min_addr and max_addr, which store
the range of valid (encountered by kmemleak) pointer values, which it
later uses to speed up pointer lookup when scanning blocks.

With tagged pointers this range will get bigger than it needs to be.  This
patch makes kmemleak untag pointers before saving them to min_addr and
max_addr and when performing a lookup.

Link: http://lkml.kernel.org/r/16e887d442986ab87fe87a755815ad92fa431a5f.1550066133.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl at google.com>
Tested-by: Qian Cai <cai at lca.pw>
Acked-by: Catalin Marinas <catalin.marinas at arm.com>
Cc: Alexander Potapenko <glider at google.com>
Cc: Andrey Ryabinin <aryabinin at virtuozzo.com>
Cc: Christoph Lameter <cl at linux.com>
Cc: David Rientjes <rientjes at google.com>
Cc: Dmitry Vyukov <dvyukov at google.com>
Cc: Evgeniy Stepanov <eugenis at google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim at lge.com>
Cc: Kostya Serebryany <kcc at google.com>
Cc: Pekka Enberg <penberg at kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino at arm.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
DeltaFile
+7-3mm/kmemleak.c
+1-0mm/slab.h
+1-0mm/slab_common.c
+1-0mm/slub.c
+10-34 files

UnifiedSplitRaw