From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Linux Crypto Mailing List" <linux-crypto@vger.kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Peter Zijlstra" <peterz@infradead.org>,
"Theodore Ts'o" <tytso@mit.edu>,
"Sultan Alsawaf" <sultan@kerneltoast.com>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
"Dominik Brodowski" <linux@dominikbrodowski.net>
Subject: Re: [PATCH v6] random: defer fast pool mixing to worker
Date: Mon, 14 Feb 2022 12:16:33 +0100 [thread overview]
Message-ID: <Ygo6EX1YVgTrtjVT@linutronix.de> (raw)
In-Reply-To: <CAHmME9otmV1QCX29D_DXsHB-41puTKurWtyZ39huPZtD4mt5ng@mail.gmail.com>
On 2022-02-14 11:17:20 [+0100], Jason A. Donenfeld wrote:
> On 2/14/22, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> > to
> > | - Does anything anywhere call get_random_xx() before the worker has a
> > | chance to run?
> >
> > Once you queue a work item I don't think that the scheduler needs to put
> > it on the CPU right away. It may have already have other tasks waiting
> > including some with a RT priority.
> > Also, the lock is irqsave() so they can be users in an interrupt
> > handler. I remember the original reason why I made it irqsave is because
> > something did kmalloc() and SLUB somehow asked for random bits.
>
> Right. So there are two sides of the questions: 1) how bad is this
> actual race, and are there any drivers that do regularly get bit by
> this? 2) There's a largeish window between workqueue_init_early()
> setting up the system highprio workqueue, and workqueue_init()
> enabling queued workers to actually run. Interrupts also get enabled
> in the interim. Does anything get bit by that window?
This is only important during boot-up, right? Otherwise it just extracts
entropy from the pool.
I posted numbers earlier on where the work go scheduled and the three or
four interrupts came in before the work-item was scheduled. I could send
you the diff if you want to up it on some machines.
> Jason
Sebastian
next prev parent reply other threads:[~2022-02-14 11:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 13:08 [PATCH v5] random: defer fast pool mixing to worker Jason A. Donenfeld
2022-02-11 15:00 ` Sebastian Andrzej Siewior
2022-02-11 16:25 ` [PATCH v6] " Jason A. Donenfeld
2022-02-11 16:44 ` Sebastian Andrzej Siewior
2022-02-11 16:50 ` Jason A. Donenfeld
2022-02-11 16:58 ` Sebastian Andrzej Siewior
2022-02-11 17:00 ` Jason A. Donenfeld
2022-02-11 17:15 ` Sebastian Andrzej Siewior
2022-02-11 17:17 ` Jason A. Donenfeld
2022-02-11 17:26 ` Sebastian Andrzej Siewior
2022-02-13 21:04 ` Jason A. Donenfeld
2022-02-14 10:19 ` Jason A. Donenfeld
2022-02-13 17:37 ` Jason A. Donenfeld
2022-02-14 9:16 ` Sebastian Andrzej Siewior
2022-02-14 10:17 ` Jason A. Donenfeld
2022-02-14 11:16 ` Sebastian Andrzej Siewior [this message]
2022-02-14 14:47 ` Jason A. Donenfeld
2022-02-11 17:07 ` [PATCH v7] " Jason A. Donenfeld
2022-02-11 17:20 ` Sultan Alsawaf
2022-02-11 17:24 ` Sebastian Andrzej Siewior
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=Ygo6EX1YVgTrtjVT@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=Jason@zx2c4.com \
--cc=j.neuschaefer@gmx.net \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=peterz@infradead.org \
--cc=sultan@kerneltoast.com \
--cc=tglx@linutronix.de \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.