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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Sep 2010 09:31:15 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Tejun Heo <htejun@...il.com>,
	Stephane Eranian <eranian@...gle.com>,
	Eric Dumazet <eric.dumazet@...il.com>,
	linux-kernel@...r.kernel.org, mingo@...e.hu, paulus@...ba.org,
	davem@...emloft.net, fweisbec@...il.com,
	perfmon2-devel@...ts.sf.net, eranian@...il.com,
	robert.richter@....com, acme@...hat.com
Subject: Re: [PATCH percpu#for-next] percpu: clear memory allocated with the
 km allocator

On Fri, 10 Sep 2010 10:55:18 +0200 Peter Zijlstra wrote:

> On Fri, 2010-09-10 at 10:52 +0200, Tejun Heo wrote:
> > Percpu allocator should clear memory before returning it but the km
> > allocator forgot to do it.  Fix it.
> > 
> > Signed-off-by: Tejun Heo <tj@...nel.org>
> > Spotted-by: Peter Zijlstra <peterz@...radead.org>
> 
> (fwiw, -tip uses Reported-by)

fyi, Documentation/SubmittingPatches does also.


> Acked-by: Peter Zijlstra <peterz@...radead.org>
> 
> > ---
> >  mm/percpu-km.c |    6 +++++-
> >  1 files changed, 5 insertions(+), 1 deletions(-)
> > 
> > diff --git a/mm/percpu-km.c b/mm/percpu-km.c
> > index 7037bc7..89633fe 100644
> > --- a/mm/percpu-km.c
> > +++ b/mm/percpu-km.c
> > @@ -35,7 +35,11 @@
> > 
> >  static int pcpu_populate_chunk(struct pcpu_chunk *chunk, int off, int size)
> >  {
> > -	/* noop */
> > +	unsigned int cpu;
> > +
> > +	for_each_possible_cpu(cpu)
> > +		memset((void *)pcpu_chunk_addr(chunk, cpu, 0) + off, 0, size);
> > +
> >  	return 0;
> >  }


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
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