From: Florian Westphal <fw@strlen.de>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter: meta: add PRANDOM support
Date: Tue, 16 Feb 2016 15:09:22 +0100 [thread overview]
Message-ID: <20160216140922.GD13417@breakpoint.cc> (raw)
In-Reply-To: <56C32A87.2000104@iogearbox.net>
Daniel Borkmann <daniel@iogearbox.net> wrote:
> On 02/16/2016 02:19 PM, Florian Westphal wrote:
> >Daniel Borkmann <daniel@iogearbox.net> wrote:
> >>>+ case NFT_META_PRANDOM:
> >>>+ if (!prand_inited) {
> >>>+ prandom_seed_full_state(&nft_prandom_state);
> >>>+ prand_inited = true;
> >>>+ }
> >>
> >>Should this be: prandom_init_once() ?
> >
> >Thought about that but this is slowpath so I considered
> >the use of static key magic a bit overkill....
> >
> >I don't mind, if you think prandom_init_once is prefereable I'll respin.
>
> You'd have the benefit that the prng init would be race free. nft_meta_get_init()
> could be called in parallel from multiple CPUs, right?
We're serialized by nftables' nfnetlink mutex.
I guess I'll just send a V2 and use prandom_init_once after all.
Thanks!
prev parent reply other threads:[~2016-02-16 14:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 12:09 [PATCH nf-next] netfilter: meta: add PRANDOM support Florian Westphal
2016-02-16 12:48 ` Daniel Borkmann
2016-02-16 13:19 ` Florian Westphal
2016-02-16 13:56 ` Daniel Borkmann
2016-02-16 14:09 ` Florian Westphal [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=20160216140922.GD13417@breakpoint.cc \
--to=fw@strlen.de \
--cc=daniel@iogearbox.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).