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:	Fri, 11 Sep 2015 16:41:26 +0200
From:	Rasmus Villemoes <linux@...musvillemoes.dk>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Jason Baron <jbaron@...mai.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: static key arrays?

On Fri, Sep 11 2015, Johannes Berg <johannes@...solutions.net> wrote:

> On Fri, 2015-09-11 at 13:10 +0200, Peter Zijlstra wrote:
>> 
>> struct static_key_false array[n] = { STATIC_KEY_FALSE_INIT, };
>> 
>> or something like that.
>
> Yeah, ok, this would be sufficient for me - no need to mix different
> types. I don't think that initializer works, but I guess we can just
> duplicate it in the code 

That's inconvenient for large arrays. I think the 'or something' would
be the range initialization supported by gcc (and I think also clang):

struct static_key_false array[N] = { [0 ... N-1] = STATIC_KEY_FALSE_INIT };

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