From: Daniel Borkmann <daniel@iogearbox•net>
To: Alexei Starovoitov <ast@plumgrid•com>, davem@davemloft•net
Cc: hannes@stressinduktion•org, netdev@vger•kernel.org,
Chema Gonzalez <chema@google•com>
Subject: Re: [PATCH net-next 5/5] bpf: split state from prandom_u32() and consolidate {c,e}BPF prngs
Date: Wed, 07 Oct 2015 23:01:57 +0200 [thread overview]
Message-ID: <56158845.4090809@iogearbox.net> (raw)
In-Reply-To: <56154A84.5020206@plumgrid.com>
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@plumgrid•com>
>
prev parent reply other threads:[~2015-10-07 21:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 13:43 [PATCH net-next 0/5] BPF/random32 updates Daniel Borkmann
2015-10-07 13:43 ` [PATCH net-next 1/5] net: move net_get_random_once to lib Daniel Borkmann
2015-10-07 13:43 ` [PATCH net-next 2/5] once: make helper generic for calling function once Daniel Borkmann
2015-10-07 16:16 ` Alexei Starovoitov
2015-10-07 21:00 ` Daniel Borkmann
2015-10-07 13:43 ` [PATCH net-next 3/5] random32: add prandom_seed_full_state helper Daniel Borkmann
2015-10-07 13:43 ` [PATCH net-next 4/5] random32: add prandom_init_once helper for own rngs Daniel Borkmann
2015-10-07 16:32 ` Alexei Starovoitov
2015-10-07 13:43 ` [PATCH net-next 5/5] bpf: split state from prandom_u32() and consolidate {c,e}BPF prngs Daniel Borkmann
2015-10-07 16:38 ` Alexei Starovoitov
2015-10-07 21:01 ` Daniel Borkmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56158845.4090809@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=ast@plumgrid$(echo .)com \
--cc=chema@google$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=hannes@stressinduktion$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox