All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	Jean-Philippe Brucker <jean-philippe@linaro.org>
Subject: Re: [PATCH v5] random: remove early archrandom abstraction
Date: Tue, 1 Nov 2022 14:05:51 +0000	[thread overview]
Message-ID: <Y2Env04RIXEpNstS@arm.com> (raw)
In-Reply-To: <20221101122527.323843-1-Jason@zx2c4.com>

On Tue, Nov 01, 2022 at 01:25:28PM +0100, Jason A. Donenfeld wrote:
> The arch_get_random*_early() abstraction is not completely useful and
> adds complexity, because it's not a given that there will be no calls to
> arch_get_random*() between random_init_early(), which uses
> arch_get_random*_early(), and init_cpu_features(). During that gap,
> crng_reseed() might be called, which uses arch_get_random*(), since it's
> mostly not init code.
> 
> Instead we can test whether we're in the early phase in
> arch_get_random*() itself, and in doing so avoid all ambiguity about
> where we are. Fortunately, the only architecture that currently
> implements arch_get_random*_early() also has an alternatives-based cpu
> feature system, one flag of which determines whether the other flags
> have been initialized. This makes it possible to do the early check with
> zero cost once the system is initialized.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	Jean-Philippe Brucker <jean-philippe@linaro.org>
Subject: Re: [PATCH v5] random: remove early archrandom abstraction
Date: Tue, 1 Nov 2022 14:05:51 +0000	[thread overview]
Message-ID: <Y2Env04RIXEpNstS@arm.com> (raw)
In-Reply-To: <20221101122527.323843-1-Jason@zx2c4.com>

On Tue, Nov 01, 2022 at 01:25:28PM +0100, Jason A. Donenfeld wrote:
> The arch_get_random*_early() abstraction is not completely useful and
> adds complexity, because it's not a given that there will be no calls to
> arch_get_random*() between random_init_early(), which uses
> arch_get_random*_early(), and init_cpu_features(). During that gap,
> crng_reseed() might be called, which uses arch_get_random*(), since it's
> mostly not init code.
> 
> Instead we can test whether we're in the early phase in
> arch_get_random*() itself, and in doing so avoid all ambiguity about
> where we are. Fortunately, the only architecture that currently
> implements arch_get_random*_early() also has an alternatives-based cpu
> feature system, one flag of which determines whether the other flags
> have been initialized. This makes it possible to do the early check with
> zero cost once the system is initialized.
> 
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

  parent reply	other threads:[~2022-11-01 14:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 23:40 [PATCH] random: remove early archrandom abstraction Jason A. Donenfeld
2022-10-28 23:40 ` Jason A. Donenfeld
2022-10-30 17:30 ` Catalin Marinas
2022-10-30 17:30   ` Catalin Marinas
2022-10-30 21:07   ` Jason A. Donenfeld
2022-10-30 21:07     ` Jason A. Donenfeld
2022-10-30 21:21     ` [PATCH v2] " Jason A. Donenfeld
2022-10-30 21:21       ` Jason A. Donenfeld
2022-10-31 10:28       ` [PATCH v3] " Jason A. Donenfeld
2022-10-31 10:28         ` Jason A. Donenfeld
2022-11-01 11:39         ` Catalin Marinas
2022-11-01 11:39           ` Catalin Marinas
2022-11-01 11:54           ` Jason A. Donenfeld
2022-11-01 11:54             ` Jason A. Donenfeld
2022-11-01 11:56             ` [PATCH v4] " Jason A. Donenfeld
2022-11-01 11:56               ` Jason A. Donenfeld
2022-11-01 12:25               ` [PATCH v5] " Jason A. Donenfeld
2022-11-01 12:25                 ` Jason A. Donenfeld
2022-11-01 12:36                 ` Mark Rutland
2022-11-01 12:36                   ` Mark Rutland
2022-11-01 13:02                   ` Jason A. Donenfeld
2022-11-01 13:02                     ` Jason A. Donenfeld
2022-11-01 13:07                     ` Mark Rutland
2022-11-01 13:07                       ` Mark Rutland
2022-11-01 14:05                 ` Catalin Marinas [this message]
2022-11-01 14:05                   ` Catalin Marinas

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=Y2Env04RIXEpNstS@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=jean-philippe@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@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 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.