linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] random/arm64: enable RANDOM_TRUST_CPU for arm64
@ 2020-02-10 13:00 Mark Rutland
  2020-02-10 13:00 ` [PATCH 1/4] random: split primary/secondary crng init paths Mark Rutland
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Mark Rutland @ 2020-02-10 13:00 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: mark.rutland, tytso, catalin.marinas, richard.henderson, broonie,
	will

On arm64 systems some CPUs may have RNG instructions while others do
not, and consequently we cannot generally enable the use of RNG
instructions until all CPUs have been booted (as otherwise we'd have
problems with preemption, etc). This prevents us from seeding the
primary CRNG using the RNG, as this occurs before secondary CPUs are
onlined.

These patches rework the core CRNG intialization code so that the arch
code can (optionally) distinguish boot-time usage from runtime usage of
the arch_get_random_*() functions. This allows arm64 to use the boot
CPU's RNG to seed the primary CRNG, regardless of whether secondary CPUs
support the RNG instructions. Other architectures should see no
functional change as a result of this patches.

Thanks,
Mark.

Mark Rutland (3):
  random: split primary/secondary crng init paths
  random: add arch_get_random_*long_early()
  arm64: add credited/trusted RNG support

Richard Henderson (1):
  random: Make RANDOM_TRUST_CPU depend on ARCH_RANDOM

 arch/arm64/include/asm/archrandom.h | 14 ++++++++++
 drivers/char/Kconfig                |  2 +-
 drivers/char/random.c               | 52 ++++++++++++++++++++++++++++---------
 include/linux/random.h              | 22 ++++++++++++++++
 4 files changed, 77 insertions(+), 13 deletions(-)

-- 
2.11.0


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-28  4:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-10 13:00 [PATCH 0/4] random/arm64: enable RANDOM_TRUST_CPU for arm64 Mark Rutland
2020-02-10 13:00 ` [PATCH 1/4] random: split primary/secondary crng init paths Mark Rutland
2020-02-10 13:00 ` [PATCH 2/4] random: add arch_get_random_*long_early() Mark Rutland
2020-02-10 13:00 ` [PATCH 3/4] arm64: add credited/trusted RNG support Mark Rutland
2020-02-10 13:00 ` [PATCH 4/4] random: Make RANDOM_TRUST_CPU depend on ARCH_RANDOM Mark Rutland
2020-02-26 10:24 ` [PATCH 0/4] random/arm64: enable RANDOM_TRUST_CPU for arm64 Mark Rutland
2020-02-28  4:22   ` Theodore Y. Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).