Re: [PATCH 5/5] [DEBUG] slab: Report number of NULLings
From: Kees Cook
Date: Tue Mar 25 2025 - 15:45:22 EST
On Mon, Mar 24, 2025 at 09:16:47AM -0700, Christoph Lameter (Ampere) wrote:
> On Fri, 21 Mar 2025, Kees Cook wrote:
>
> > diff --git a/include/linux/slab.h b/include/linux/slab.h
> > index 2717ad238fa2..a4740c8b6ccb 100644
> > --- a/include/linux/slab.h
> > +++ b/include/linux/slab.h
> > @@ -469,6 +469,8 @@ void __kfree(const void *objp);
> > void __kfree_sensitive(const void *objp);
> > size_t __ksize(const void *objp);
> >
> > +extern atomic_t count_nulled;
>
> That is a scalability issue. Use a vmstat counter instead?
Yeah, this patch (marked "DEBUG") isn't intended for upstreaming. It was
just a quick hack to get a ballpark statistic. :)
--
Kees Cook