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]
Message-ID: <20061227173013.GA17560@elte.hu>
Date:	Wed, 27 Dec 2006 18:30:13 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Catalin Marinas <catalin.marinas@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2.6.20-rc1 00/10] Kernel memory leak detector 0.13


* Ingo Molnar <mingo@...e.hu> wrote:

> > As I mentioned in a different e-mail, a way to remove the global 
> > hash table is to create per-cpu hashes. The only problem is that in 
> > these 8-10% of the cases, freeing would need to look up the other 
> > hashes. This would become a problem with a high number of CPUs but 
> > I'm not sure whether it would overtake the performance issues 
> > introduced by cacheline ping-ponging in the single-hash case.
> 
> i dont think it's worth doing that. So we should either do the current 
> global lock & hash (bad for scalability), or a pure per-CPU design. 
> The pure per-CPU design would have to embedd the CPU ID the object is 
> attached to into the allocated object. If that is not feasible then 
> only the global hash remains i think.

embedding the info shouldnt be /that/ hard in case of the SLAB: if the 
memleak info is at a negative offset from the allocated pointer. I.e. 
that if kmalloc() returns 'ptr', the memleak info could be at 
ptr-sizeof(memleak_info). That way you dont have to know the size of the 
object beforehand and there's absolutely no need for a global hash of 
any sort.

(it gets a bit more complex for page aligned allocations for the buddy 
and for vmalloc - but that could be solved by adding one extra pointer 
into struct page. That is a far more preferable cost than the 
locking/cache overhead of a global hash.)

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