Re: [PATCH] mm/slub: Avoid recursive loop with kmemleak

2024-04-26 Thread Kees Cook
On Fri, Apr 26, 2024 at 03:52:24PM +0100, Catalin Marinas wrote: > On Thu, Apr 25, 2024 at 01:55:23PM -0700, Kees Cook wrote: > > The system will immediate fill up stack and crash when both Oops, typo from me: "immediately". You'd never guess I'm a native English speaker! :) > > CONFIG_DEBUG_KMEM

Re: [PATCH] mm/slub: Avoid recursive loop with kmemleak

2024-04-26 Thread Catalin Marinas
On Thu, Apr 25, 2024 at 01:55:23PM -0700, Kees Cook wrote: > The system will immediate fill up stack and crash when both > CONFIG_DEBUG_KMEMLEAK and CONFIG_MEM_ALLOC_PROFILING are enabled. > Avoid allocation tagging of kmemleak caches, otherwise recursive > allocation tracking occurs. > > Fixes: 2

Re: [PATCH] mm/slub: Avoid recursive loop with kmemleak

2024-04-25 Thread Suren Baghdasaryan
On Thu, Apr 25, 2024 at 5:19 PM Kent Overstreet wrote: > > On Thu, Apr 25, 2024 at 04:49:17PM -0700, Andrew Morton wrote: > > On Thu, 25 Apr 2024 14:30:55 -0700 Suren Baghdasaryan > > wrote: > > > > > > > --- a/mm/kmemleak.c > > > > > +++ b/mm/kmemleak.c > > > > > @@ -463,7 +463,7 @@ static stru

Re: [PATCH] mm/slub: Avoid recursive loop with kmemleak

2024-04-25 Thread Kent Overstreet
On Thu, Apr 25, 2024 at 04:49:17PM -0700, Andrew Morton wrote: > On Thu, 25 Apr 2024 14:30:55 -0700 Suren Baghdasaryan > wrote: > > > > > --- a/mm/kmemleak.c > > > > +++ b/mm/kmemleak.c > > > > @@ -463,7 +463,7 @@ static struct kmemleak_object *mem_pool_alloc(gfp_t > > > > gfp) > > > > > > > >

Re: [PATCH] mm/slub: Avoid recursive loop with kmemleak

2024-04-25 Thread Andrew Morton
On Thu, 25 Apr 2024 14:30:55 -0700 Suren Baghdasaryan wrote: > > > --- a/mm/kmemleak.c > > > +++ b/mm/kmemleak.c > > > @@ -463,7 +463,7 @@ static struct kmemleak_object *mem_pool_alloc(gfp_t > > > gfp) > > > > > > /* try the slab allocator first */ > > > if (object_cache) { > > > -

Re: [PATCH] mm/slub: Avoid recursive loop with kmemleak

2024-04-25 Thread Suren Baghdasaryan
On Thu, Apr 25, 2024 at 2:09 PM Kent Overstreet wrote: > > On Thu, Apr 25, 2024 at 01:55:23PM -0700, Kees Cook wrote: > > The system will immediate fill up stack and crash when both > > CONFIG_DEBUG_KMEMLEAK and CONFIG_MEM_ALLOC_PROFILING are enabled. > > Avoid allocation tagging of kmemleak cache

Re: [PATCH] mm/slub: Avoid recursive loop with kmemleak

2024-04-25 Thread Kent Overstreet
On Thu, Apr 25, 2024 at 01:55:23PM -0700, Kees Cook wrote: > The system will immediate fill up stack and crash when both > CONFIG_DEBUG_KMEMLEAK and CONFIG_MEM_ALLOC_PROFILING are enabled. > Avoid allocation tagging of kmemleak caches, otherwise recursive > allocation tracking occurs. > > Fixes: 2

[PATCH] mm/slub: Avoid recursive loop with kmemleak

2024-04-25 Thread Kees Cook
The system will immediate fill up stack and crash when both CONFIG_DEBUG_KMEMLEAK and CONFIG_MEM_ALLOC_PROFILING are enabled. Avoid allocation tagging of kmemleak caches, otherwise recursive allocation tracking occurs. Fixes: 279bb991b4d9 ("mm/slab: add allocation accounting into slab allocation