From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf] netfilter: use get_random_u32 instead of prandom
Date: Wed, 8 Jun 2022 12:33:43 +0200 [thread overview]
Message-ID: <YqB7B2/b0mqqYVlO@salvia> (raw)
In-Reply-To: <20220518181531.92593-1-fw@strlen.de>
On Wed, May 18, 2022 at 08:15:31PM +0200, Florian Westphal wrote:
> bh might occur while updating per-cpu rnd_state from user context,
> ie. local_out path.
>
> BUG: using smp_processor_id() in preemptible [00000000] code: nginx/2725
> caller is nft_ng_random_eval+0x24/0x54 [nft_numgen]
> Call Trace:
> check_preemption_disabled+0xde/0xe0
> nft_ng_random_eval+0x24/0x54 [nft_numgen]
>
> Use the random driver instead, this also avoids need for local prandom
> state.
>
> Based on earlier patch from Pablo Neira.
Applied to nf.git, thanks.
For the record, I have also added to the commit description:
Moreover, prandom now uses the random driver since d4150779e60f
("random32: use real rng for non-deterministic randomness").
prev parent reply other threads:[~2022-06-08 10:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 18:15 [PATCH nf] netfilter: use get_random_u32 instead of prandom Florian Westphal
2022-05-18 21:21 ` Pablo Neira Ayuso
2022-05-18 21:54 ` Florian Westphal
2022-06-08 10:33 ` Pablo Neira Ayuso [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=YqB7B2/b0mqqYVlO@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--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