mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 04:44:03 +00:00
Calling kmem_obj_info() via kmem_dump_obj() on KFENCE objects has been producing garbage data due to the object not actually being maintained by SLAB or SLUB. Fix this by implementing __kfence_obj_info() that copies relevant information to struct kmem_obj_info when the object was allocated by KFENCE; this is called by a common kmem_obj_info(), which also calls the slab/slub/slob specific variant now called __kmem_obj_info(). For completeness, kmem_dump_obj() now displays if the object was allocated by KFENCE. Link: https://lore.kernel.org/all/20220323090520.GG16885@xsang-OptiPlex-9020/ Link: https://lkml.kernel.org/r/[email protected] Fixes:b89fb5ef0c("mm, kfence: insert KFENCE hooks for SLUB") Fixes:d3fb45f370("mm, kfence: insert KFENCE hooks for SLAB") Signed-off-by: Marco Elver <[email protected]> Reviewed-by: Hyeonggon Yoo <[email protected]> Reported-by: kernel test robot <[email protected]> Acked-by: Vlastimil Babka <[email protected]> [slab] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>