kmemleak: Cannot insert 0xffffff806e24f000 into the object search tree (overlaps existing) [RPi CM4]

Yee Lee (李建誼) Yee.Lee at mediatek.com
Tue Aug 16 03:52:19 PDT 2022


The kfence patch(07313a2b29ed) is based on the prior changes in kmemleak(0c24e061196c2 , merged in v6.0-rc1), but it shows up earlier in v5.19. 

@akpm
Andrew, sorry that the short fix tag caused confusing. Can we pull out the patch(07313a2b29e) in v5.19.x?

Kfence: (07313a2b29ed) https://github.com/torvalds/linux/commit/07313a2b29ed1079eaa7722624544b97b3ead84b
Kmemleak: (0c24e061196c2) https://github.com/torvalds/linux/commit/0c24e061196c21d53328d60f4ad0e5a2b3183343


The overlapping happened as kfence pool occupied the virtual address which supposed to be available for later object allocations. With the changes in kmemleak, the pool won't be recorded in VA.

The pool's kmemleak object is created from memblock_alloc and can be freed as calling memblock_free. 
If there is no more operating on its PA, we can just ignore it not removing it.


Best Regards,
Yee

-----Original Message-----
From: Marco Elver <elver at google.com> 
Sent: Monday, August 15, 2022 11:50 PM
To: Will Deacon <will at kernel.org>; Yee Lee (李建誼) <Yee.Lee at mediatek.com>
Cc: Max Schulze <max.schulze at online.de>; linux-arm-kernel at lists.infradead.org; catalin.marinas at arm.com; naush at raspberrypi.com; glider at google.com; dvyukov at google.com; kasan-dev at googlegroups.com
Subject: Re: kmemleak: Cannot insert 0xffffff806e24f000 into the object search tree (overlaps existing) [RPi CM4]

On Mon, 15 Aug 2022 at 14:47, Will Deacon <will at kernel.org> wrote:
>
> [+kfence folks as kfence_alloc_pool() is starting the stacktrace]
>
> On Mon, Aug 15, 2022 at 11:52:05AM +0200, Max Schulze wrote:
> > Hello,
> >
> > I get these messages when booting 5.19.0 on RaspberryPi CM4.
> >
> > Full boot log is at 
> > https://urldefense.com/v3/__https://pastebin.ubuntu.com/p/mVhgBwxqPj
> > /__;!!CTRNKA9wMg0ARbw!zoc_1ye57MyrB-45TNoz5wwiQLHWrXAblWZLGm1RPhPaTX
> > 6WWyI6wxHFOOrUwzw$
> >
> > Anyone seen this? What can I do ?

I think the kmemleak_ignore_phys() in [1] is wrong. It probably wants to be a kmemleak_free_part_phys().

[1] https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/mm/kfence?h=v5.19&id=07313a2b29ed1079eaa7722624544b97b3ead84b__;!!CTRNKA9wMg0ARbw!zoc_1ye57MyrB-45TNoz5wwiQLHWrXAblWZLGm1RPhPaTX6WWyI6wxHFQ-Ttpzo$ 

+Cc Yee


More information about the linux-arm-kernel mailing list