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] [day] [month] [year] [list]
Date:	Mon, 27 Jan 2014 08:14:10 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Prarit Bhargava <prarit@...hat.com>,
	Yinghai Lu <yinghai@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -v2] x86: allocate cpumask during check irq vectors


* H. Peter Anvin <hpa@...or.com> wrote:

> I strongly disagree with putting variables in file scope when 
> function scope will do, [...]

Yes, you are right that single-use file scope statics 'could' be moved 
function local and are syntactically superior because in that case 
other functions cannot make use of it.

But I also have very good (and unfixable and thus stronger) reasons to 
object to statics inside local variables: more than once I personally 
missed 'hidden statics' during review, in one case it even slipped 
into a commit, so it's not a practice I want to encourage in any shape 
or form (even if the 'rule' is to have a big fat comment, people will 
just see the function local static and emulate it without the 
comment), for code I maintain.

It's not about you, it's about me and other reviewers: I've seen 
statics slipping past other reviewers as well. So it's the lesser of 
two evils. Can you accept that reasoning?

Thanks,

	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