lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 16 Oct 2009 15:17:28 +0300
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	linux-kernel@...r.kernel.org,
	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
	Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [PATCH] kmemleak: Do not use off-slab management with 
	SLAB_NOLEAKTRACE

On Fri, Oct 16, 2009 at 3:08 PM, Catalin Marinas
<catalin.marinas@....com> wrote:
> On Thu, 2009-10-15 at 21:59 +0300, Pekka Enberg wrote:
>> Catalin Marinas wrote:
>> > With the slab allocator, if off-slab management is enabled for the
>> > kmem_caches used by kmemleak, it leads to recursive calls into
>> > kmemleak_alloc(). Off-slab management can be triggered by other config
>> > options increasing the slab size, e.g. DEBUG_PAGEALLOC.
>> >
>> > Reported-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
>> > Cc: Pekka Enberg <penberg@...helsinki.fi>
>> > Cc: Christoph Lameter <cl@...ux-foundation.org>
>> > Signed-off-by: Catalin Marinas <catalin.marinas@....com>
>>
>> Forcing slabs to use on-slab management is pretty bad from memory
>> consumption point of view. Wouldn't it be better to annotate the
>> recursive calls somehow?
>
> The are annotated using SLAB_NOLEAKTRACE but off-slab management uses a
> general cachep and we cannot use this flag on them as we end up ignoring
> kmalloc allocations. An alternative is to use GFP_ flag rather than a
> SLAB_ one to track the recursive calls.
>
> I could also rework the way hooks were added to slab.c but currently
> they follow the same places as kmemcheck_slab_alloc and
> lockdep_trace_alloc.
>
> Anyway, the kmemleak caches only need off-slab management when
> DEBUG_PAGEALLOC is enabled but in this case the memory consumption is
> high anyway.

Oh, right, I misread the patch, sorry. Please feel free to put the
patch in kmemleak.git:

Reviewed-by: Pekka Enberg <penberg@...helsinki.fi>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ