From: Willy Tarreau <w@1wt•eu>
To: Yann Ylavic <ylavic.dev@gmail•com>
Cc: linux-kernel@vger•kernel.org,
Linux Kernel Network Developers <netdev@vger•kernel.org>,
Sedat Dilek <sedat.dilek@gmail•com>,
George Spelvin <lkml@sdf•org>, Amit Klein <aksecurity@gmail•com>,
Eric Dumazet <edumazet@google•com>,
"Jason A. Donenfeld" <Jason@zx2c4•com>,
Andy Lutomirski <luto@kernel•org>,
Kees Cook <keescook@chromium•org>,
Thomas Gleixner <tglx@linutronix•de>,
Peter Zijlstra <peterz@infradead•org>,
Linus Torvalds <torvalds@linux-foundation•org>,
tytso@mit•edu, Florian Westphal <fw@strlen•de>,
Marc Plumb <lkml.mplumb@gmail•com>
Subject: Re: [PATCH 1/2] random32: make prandom_u32() output unpredictable
Date: Tue, 1 Sep 2020 10:39:47 +0200 [thread overview]
Message-ID: <20200901083947.GB901@1wt.eu> (raw)
In-Reply-To: <CAKQ1sVM9SMYVTSZYaGuPDhQHfyEOFSxBL8PNixyaN4pR2PWMxQ@mail.gmail.com>
On Tue, Sep 01, 2020 at 10:33:40AM +0200, Yann Ylavic wrote:
> On Tue, Sep 1, 2020 at 8:45 AM Willy Tarreau <w@1wt•eu> wrote:
> >
> > +/*
> > + * Generate some initially weak seeding values to allow
> > + * the prandom_u32() engine to be started.
> > + */
> > +static int __init prandom_init_early(void)
> > +{
> > + int i;
> > + unsigned long v0, v1, v2, v3;
> > +
> > + if (!arch_get_random_long(&v0))
> > + v0 = jiffies;
> > + if (!arch_get_random_long(&v1))
> > + v0 = random_get_entropy();
>
> Shouldn't the above be:
> v1 = random_get_entropy();
> ?
Very good catch, many thanks Yann! Now fixed in my local tree.
Willy
next prev parent reply other threads:[~2020-09-01 8:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 6:43 [PATCH 0/2] prandom_u32: make output less predictable Willy Tarreau
2020-09-01 6:43 ` [PATCH 1/2] random32: make prandom_u32() output unpredictable Willy Tarreau
2020-09-01 8:33 ` Yann Ylavic
2020-09-01 8:39 ` Willy Tarreau [this message]
2020-09-01 8:46 ` Sedat Dilek
2020-09-01 8:56 ` Willy Tarreau
2020-09-01 9:26 ` Sedat Dilek
2020-09-01 13:10 ` David Laight
2020-09-01 13:16 ` Willy Tarreau
[not found] ` <CANEQ_+Kuw6cxWRBE6NyXkr=8p3W-1f=o1q91ZESeueEnna9fvw@mail.gmail.com>
2020-09-14 16:16 ` Sedat Dilek
2020-09-14 16:29 ` Willy Tarreau
2020-09-14 16:48 ` Sedat Dilek
2020-09-01 6:43 ` [PATCH 2/2] random32: add noise from network and scheduling activity Willy Tarreau
2020-09-01 10:24 ` Eric Dumazet
2020-09-01 11:57 ` Willy Tarreau
2020-09-01 14:41 ` [PATCH 0/2] prandom_u32: make output less predictable Sedat Dilek
2020-09-01 14:55 ` Willy Tarreau
2020-09-01 15:19 ` Eric Dumazet
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=20200901083947.GB901@1wt.eu \
--to=w@1wt$(echo .)eu \
--cc=Jason@zx2c4$(echo .)com \
--cc=aksecurity@gmail$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=fw@strlen$(echo .)de \
--cc=keescook@chromium$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=lkml.mplumb@gmail$(echo .)com \
--cc=lkml@sdf$(echo .)org \
--cc=luto@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=peterz@infradead$(echo .)org \
--cc=sedat.dilek@gmail$(echo .)com \
--cc=tglx@linutronix$(echo .)de \
--cc=torvalds@linux-foundation$(echo .)org \
--cc=tytso@mit$(echo .)edu \
--cc=ylavic.dev@gmail$(echo .)com \
/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