Re: [PATCH] mm, kfence: support kmem_dump_obj() for KFENCE objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 7 Apr 2022 at 11:43, Vlastimil Babka <vbabka@xxxxxxx> wrote:
>
> On 4/6/22 15:15, Marco Elver wrote:
> > 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/
> > Fixes: b89fb5ef0ce6 ("mm, kfence: insert KFENCE hooks for SLUB")
> > Fixes: d3fb45f370d9 ("mm, kfence: insert KFENCE hooks for SLAB")
> > Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
> > Signed-off-by: Marco Elver <elver@xxxxxxxxxx>
> > Reviewed-by: Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>
>
> Thanks.
> Given the impact on slab, and my series exposing the bug, I will add this to
> slab tree.

It's already in Andrew's tree:
https://lore.kernel.org/all/20220406192351.2E115C385A5@xxxxxxxxxxxxxxx/T/#u

Does your series and this patch merge cleanly? If so, maybe leaving in
-mm is fine. Of course I don't mind either way and it's up to you and
Andrew.

Thanks,
-- Marco




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux