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  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:	Wed, 07 Oct 2015 23:01:57 +0200
From:	Daniel Borkmann <daniel@...earbox.net>
To:	Alexei Starovoitov <ast@...mgrid.com>, davem@...emloft.net
CC:	hannes@...essinduktion.org, netdev@...r.kernel.org,
	Chema Gonzalez <chema@...gle.com>
Subject: Re: [PATCH net-next 5/5] bpf: split state from prandom_u32() and
 consolidate {c,e}BPF prngs

On 10/07/2015 06:38 PM, Alexei Starovoitov wrote:
> On 10/7/15 6:43 AM, Daniel Borkmann wrote:
>> +void bpf_user_rnd_init_once(void)
>> +{
>> +    prandom_init_once(&bpf_user_rnd_state);
>> +}
>
> here the helper is definitely needed, since it's called from two
> places and we must make sure that prandom_init_once doesn't
> duplicate its static_key in two places.

Yes, sure.

> Probably makes sense to add a comment to do_once api that
>
> do_once(func, arg);
> do_once(func, arg);
>
> is not equal to
>
> void my_helper(void) { do_once(func, arg); }
> my_helper();
> my_helper();

Makes sense, added a comment.

> For this patch:
> Acked-by: Alexei Starovoitov <ast@...mgrid.com>
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists