Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	LKML <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH v5] powerpc/powernv: wire up rng during setup_arch
Date: Tue, 21 Jun 2022 20:47:52 +0200	[thread overview]
Message-ID: <YrISWLwm8m7OPFom@zx2c4.com> (raw)
In-Reply-To: <246d8bf0-2bee-7e1b-e0af-408920ece309@csgroup.eu>

Hi Christophe,

On Tue, Jun 21, 2022 at 06:33:11PM +0000, Christophe Leroy wrote:
> Le 21/06/2022 à 16:08, Jason A. Donenfeld a écrit :
> > The platform's RNG must be available before random_init() in order to be
> > useful for initial seeding, which in turn means that it needs to be
> > called from setup_arch(), rather than from an init call. Fortunately,
> > each platform already has a setup_arch function pointer, which means we
> > can wire it up that way. Complicating things, however, is that POWER8
> > systems need some per-cpu state and kmalloc, which isn't available at
> > this stage. So we split things up into an early phase and a later
> > opportunistic phase. This commit also removes some noisy log messages
> > that don't add much.
> 
> Regarding the kmalloc(), I have not looked at it in details, but usually 
> you can use memblock_alloc() when kmalloc is not available yet.

That seems a bit excessive, especially as those allocations are long
lived. And we don't even *need* it that early, but just before
random_init(). Michael is running this v5 on the test rig overnight, so
we'll learn in the Australian morning whether this finally did the trick
(I hope).

Jason

  reply	other threads:[~2022-06-21 18:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220611151015.548325-1-Jason@zx2c4.com>
2022-06-11 15:10 ` [PATCH v3 1/3] powerpc/microwatt: wire up rng during setup_arch Jason A. Donenfeld
2022-06-11 16:25   ` Christophe Leroy
2022-06-11 15:10 ` [PATCH v3 2/3] powerpc/powernv: " Jason A. Donenfeld
2022-06-11 16:25   ` Christophe Leroy
2022-06-19 11:49   ` Michael Ellerman
2022-06-19 20:32     ` Jason A. Donenfeld
2022-06-20 12:45       ` [PATCH v4] " Jason A. Donenfeld
2022-06-21 14:08         ` [PATCH v5] " Jason A. Donenfeld
2022-06-21 18:33           ` Christophe Leroy
2022-06-21 18:47             ` Jason A. Donenfeld [this message]
2022-06-21 19:22               ` Christophe Leroy
2022-06-22  2:27                 ` Michael Ellerman
2022-06-26  0:28           ` Michael Ellerman
2022-06-11 15:10 ` [PATCH v3 3/3] powerpc/pseries: " Jason A. Donenfeld
2022-06-11 16:25   ` Christophe Leroy

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=YrISWLwm8m7OPFom@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=stable@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