The patch titled Subject: mm/slub: fix backtrace of objects because of redzone adjustment has been removed from the -mm tree. Its filename was mm-slub-fixing-backtrace-of-objects-because-of-redzone-adjustment.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Maninder Singh <maninder1.s@xxxxxxxxxxx> Subject: mm/slub: fix backtrace of objects because of redzone adjustment Fix commit 8e7f37f2aaa5 ("mm: Add mem_dump_obj() to print source of memory block") With the current code the backtrace of an allocated object is wrong: / # cat /proc/meminfo [ 14.969843] slab kmalloc-64 start c8ab0140 data offset 64 pointer offset 0 size 64 allocated at 0x6b6b6b6b [ 14.970635] 0x6b6b6b6b [ 14.970794] 0x6b6b6b6b [ 14.970932] 0x6b6b6b6b [ 14.971077] 0x6b6b6b6b [ 14.971202] 0x6b6b6b6b [ 14.971317] 0x6b6b6b6b [ 14.971423] 0x6b6b6b6b [ 14.971635] 0x6b6b6b6b [ 14.971740] 0x6b6b6b6b [ 14.971871] 0x6b6b6b6b [ 14.972229] 0x6b6b6b6b [ 14.972363] 0x6b6b6b6b [ 14.972505] 0xa56b6b6b [ 14.972631] 0xbbbbbbbb [ 14.972734] 0xc8ab0400 [ 14.972891] meminfo_proc_show+0x40/0x4fc Because the red zone was not adjusted from the object address. after adding this fixup for redzone, the backtrace is correct: / # cat /proc/meminfo [ 14.870782] slab kmalloc-64 start c8ab0140 data offset 64 pointer offset 128 size 64 allocated at meminfo_proc_show+0x40/0x4f4 [ 14.871817] meminfo_proc_show+0x40/0x4f4 [ 14.872035] seq_read_iter+0x18c/0x4c4 [ 14.872229] proc_reg_read_iter+0x84/0xac [ 14.872433] generic_file_splice_read+0xe8/0x17c [ 14.872621] splice_direct_to_actor+0xb8/0x290 [ 14.872747] do_splice_direct+0xa0/0xe0 [ 14.872896] do_sendfile+0x2d0/0x438 [ 14.873044] sys_sendfile64+0x12c/0x140 [ 14.873229] ret_fast_syscall+0x0/0x58 [ 14.873372] 0xbe861de4 Link: https://lkml.kernel.org/r/1615891032-29160-1-git-send-email-maninder1.s@xxxxxxxxxxx Fixes: 8e7f37f2aaa5 ("mm: Add mem_dump_obj() to print source of memory Signed-off-by: Vaneet Narang <v.narang@xxxxxxxxxxx> Signed-off-by: Maninder Singh <maninder1.s@xxxxxxxxxxx> Acked-by: Paul E. McKenney <paulmck@xxxxxxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Dmitry Safonov <0x7f454c46@xxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slub.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/slub.c~mm-slub-fixing-backtrace-of-objects-because-of-redzone-adjustment +++ a/mm/slub.c @@ -3991,6 +3991,7 @@ void kmem_obj_info(struct kmem_obj_info !(s->flags & SLAB_STORE_USER)) return; #ifdef CONFIG_SLUB_DEBUG + objp = fixup_red_left(s, objp); trackp = get_track(s, objp, TRACK_ALLOC); kpp->kp_ret = (void *)trackp->addr; #ifdef CONFIG_STACKTRACE _ Patches currently in -mm which might be from maninder1.s@xxxxxxxxxxx are arm-print-alloc-free-paths-for-address-in-registers.patch