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: <20140427115448.GB22116@gmail.com>
Date:	Sun, 27 Apr 2014 13:54:48 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Oren Twaig <oren@...lemp.com>
Cc:	Andi Kleen <ak@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org, Shai Fultheim <shai@...lemp.com>
Subject: Re: [PATCH v2] X86: Hook apic vector allocation domain only when
 interrupt routing are set to ignore


* Oren Twaig <oren@...lemp.com> wrote:

> Hi Andi,
> 
> On 04/25/2014 05:22 PM, Andi Kleen wrote:
> >> +static int irc = 1;
> >
> > Using a static for such state is very unusual. You need to 
> > describe what protects it against races and why that is needed 
> > over a cleaner solution.
> 
> The only reason I've used a static variable is because I wanted to 
> avoid inserting another code/functions which are depended on 
> CONFIG_PCI.  The code is used once during initialization and hence 
> cannot be racy.
> 
> But, if static variables are unusual (new at linux kernel), [...]

They aren't unusual at all - Andi Kleen is a known to troll x86 
discussions time and again with random input, just ignore it when you 
get bad advice.

> [...] I will change the flow to read the HW state again (using the 
> PCI functions).  Please let me know if that is desirable.

No, being slower is not desirable.

Maybe name the flag in a clearer fashion (the term 'irc' is used for 
something entirely different, most of the time), i.e. make sure it's 
very obvious that it's a set-once init flag.

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