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:	Tue, 4 Oct 2011 09:59:58 -0700
From:	Tejun Heo <htejun@...il.com>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Huajun Li <huajun.li.lee@...il.com>,
	Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [PATCH 2/4] kmemleak: Handle percpu memory allocation

Hello, Catalin.

On Tue, Oct 04, 2011 at 10:26:24AM +0100, Catalin Marinas wrote:
> Before kmemleak is initialised we still get memory allocations that
> kmemleak stores in an early_log buffer (via the log_early() function
> called from kmemleak_alloc_percpu). Later when kmemleak has all the data
> structures in place, the kmemleak_init() function goes through the
> early_log array and replays the previously recorded requests. The
> early_alloc_percpu() function is used during early_log replaying and it
> indeed registers every percpu memory block but the early_log is always
> O(#PCPU_ALLOCS).
> 
> The reason we don't call kmemleak_alloc_percpu() directly during
> replaying is that early_alloc() also copies the previously recorded
> stack trace into the newly created object (otherwise all early
> allocations would be shown as done by kmemleak_init).

Ah, okay, I was misreading the patch.  For some reason, log_early()
was nested inside for_each_possible_cpu(), but one other thing.
kmemleak_free_percpu() is calling log_early() w/ KMEMLEAK_FREE.
Shouldn't it be KMEMLEAK_FREE_PERCPU?

Thanks.

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