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: <1236334756.6326.106.camel@laptop>
Date:	Fri, 06 Mar 2009 11:19:16 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Ingo Molnar <mingo@...e.hu>,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 2/2] lockdep: initialize lockdep debugging statistics

On Fri, 2009-03-06 at 01:56 -0800, David Rientjes wrote:
> 
> Peter, this is purely a matter of good software engineering practices. 

For complex types I would agree, but atomic_t is assumed to be just
another int - just with special ops. For such things we can hold that
memset('0') will properly initialize them to their 0 value.

>  I 
> hadn't realized you were so passionate about avoiding initialization of 
> global atomic_t variables, 

Given that static/global storage is properly initialized to 0, and the
above, it seems to be redundant.

> I assume you wouldn't object to removing all such cases in the kernel.
> 
>         $ grep -r "atomic_t.*= ATOMIC_INIT(0)" * | wc -l
>         104

Only IFF all those cases are for static/global storage. Otherwise you
have to ensure 0-ness by either using __GFP_ZERO or explicit
initialization.

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