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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Dec 2008 17:43:22 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Dave Hansen <dave@...ux.vnet.ibm.com>
Cc:	Pekka Enberg <penberg@...helsinki.fi>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/15] kmemleak: Add memleak_alloc callback from
	alloc_large_system_hash

On Fri, 2008-12-12 at 09:17 -0800, Dave Hansen wrote:
> On Fri, 2008-12-12 at 17:04 +0000, Catalin Marinas wrote:
> > It looks to me like alloc_large_system_hash() could also be called at
> > some later point and it may even invoke __vmalloc() if hashdist is set.
> > So I would prefer not to introduce another hook and additional if's to
> > know which one to call. BTW, I think the callback should actually be (to
> > avoid duplicating the vmalloc call, with proper comment):
> > 
> >         if (!hashdist)
> >                 memleak_alloc(table, size, 1, GFP_ATOMIC);
> 
> Does memleak_alloc() detect if it gets called twice on the same memory?

It does, and panics (disables itself). I think if this happens it is a
kmemleak bug and some hook is missing or added twice.

> Also, is alloc_large_system_hash() contained in the tests that you can
> compile for kmemleak?

No. This memleak_alloc() callback was mainly added to avoid plenty of
false reports from various parts of the kernel (especially the IPv4
stack). It wasn't really meant to track the allocated hash blocks.

-- 
Catalin

--
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