[PATCH v2 1/1] mm: kfence: apply kmemleak_ignore_phys on early allocated pool
Andrew Morton
akpm at linux-foundation.org
Fri Jul 15 16:33:05 PDT 2022
On Fri, 15 Jul 2022 10:17:43 +0200 Geert Uytterhoeven <geert at linux-m68k.org> wrote:
> On Tue, Jun 28, 2022 at 1:42 PM <yee.lee at mediatek.com> wrote:
> > From: Yee Lee <yee.lee at mediatek.com>
> >
> > This patch solves two issues.
> >
> > (1) The pool allocated by memblock needs to unregister from
> > kmemleak scanning. Apply kmemleak_ignore_phys to replace the
> > original kmemleak_free as its address now is stored in the phys tree.
> >
> > (2) The pool late allocated by page-alloc doesn't need to unregister.
> > Move out the freeing operation from its call path.
> >
> > Suggested-by: Catalin Marinas <catalin.marinas at arm.com>
> > Suggested-by: Marco Elver <elver at google.com>
> > Signed-off-by: Yee Lee <yee.lee at mediatek.com>
>
> Thank you, this fixes the storm of
>
> BUG: KFENCE: invalid read in scan_block+0x78/0x130
> BUG: KFENCE: use-after-free read in scan_block+0x78/0x130
> BUG: KFENCE: out-of-bounds read in scan_block+0x78/0x130
>
> messages I was seeing on arm64.
Thanks, but...
- It would be great if we could identify a Fixes: for this.
- This patch has been accused of crashing the kernel:
https://lkml.kernel.org/r/YsFeUHkrFTQ7T51Q@xsang-OptiPlex-9020
Do we think that report is bogus?
More information about the Linux-mediatek
mailing list