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 02:13:14 -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,

On Tue, Oct 04, 2011 at 10:04:46AM +0100, Catalin Marinas wrote:
> > The percpu part looks fine to me but I don't know how kmemleak works
> > to judge whether the kmemleak part is okay or not.  This just avoids
> > false positives from slab and would still require bumping up the early
> > log memory as # of cpus increases, right?
> 
> No, there is only one kmemleak call for each __percpu pointer (to the
> specific kmemleak_*_percpu function). The kmemleak expands the percpu
> pointer into corresponding blocks for each cpu but the early log only
> stores a single call.

Hmmm... but the following definitely seems O(#PCPU_ALLOCS * #CPUS)?
What am I missing?

+/*
+ * Log an early allocated block and populate the stack trace.
+ */
+static void early_alloc_percpu(struct early_log *log)
+{
+       unsigned int cpu;
+       const void __percpu *ptr = log->ptr;
+
+       for_each_possible_cpu(cpu) {
+               log->ptr = per_cpu_ptr(ptr, cpu);
+               early_alloc(log);
+       }
+}

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