All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC/PATCH 0/3] Add devicetree scanning for randomness
@ 2014-02-12  1:33 ` Laura Abbott
  0 siblings, 0 replies; 71+ messages in thread
From: Laura Abbott @ 2014-02-12  1:33 UTC (permalink / raw)
  To: Grant Likely, Rob Herring, Arnd Bergmann
  Cc: Laura Abbott, linux-kernel, devicetree, linux-arm-kernel,
	Kumar Gala, Kees Cook

Hi,

This is an RFC to seed the random number pool earlier when using devicetree.
The big issue this is trying to solve is the fact that the stack canary for
ARM tends to be the same across bootups of the same device. This is because
the random number pools do not get initialized until after the canary has
been set up. The canary can be moved later, but in general there is still
no way to reliably get random numbers early for other features (e.g. vector
randomization).

The goal here is to allow devices to add to the random pools via
add_device_randomness or some other method of their chosing at FDT time.
I realize that ARCH_RANDOM is already available but this didn't work because
1) ARCH_RANDOM is not multi-platform compatible without added
infrastructure to ARM
2) There is no uniform way to generate the random numbers which
would require an additional framework (same result as #1, different
reasons)
3) Given there is no uniform way to generate the random numbers, it seems
unlikely that 'early' random numbers would work the same as 'non-early'
random number which adds another layer of complexity.

The big reason to skip ARCH_RANDOM though is that the random number generation
we have would be reasonable if only seeded earlier.

Thanks,
Laura


Laura Abbott (3):
  of: Add early randomness hooks
  arm: Add ARCH_WANT_OF_RANDOMNESS
  init: Move stack canary initialization after setup_arch

 arch/arm/Kconfig                  |    3 ++
 arch/arm/kernel/vmlinux.lds.S     |    1 +
 drivers/of/Kconfig                |    7 ++++++
 drivers/of/Makefile               |    1 +
 drivers/of/fdt.c                  |    7 ++++++
 drivers/of/of_randomness.c        |   43 +++++++++++++++++++++++++++++++++++++
 include/asm-generic/vmlinux.lds.h |    5 ++++
 include/linux/of_randomness.h     |   42 ++++++++++++++++++++++++++++++++++++
 init/main.c                       |    9 +++----
 9 files changed, 113 insertions(+), 5 deletions(-)
 create mode 100644 drivers/of/of_randomness.c
 create mode 100644 include/linux/of_randomness.h

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation


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

end of thread, other threads:[~2014-02-18 18:19 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12  1:33 [RFC/PATCH 0/3] Add devicetree scanning for randomness Laura Abbott
2014-02-12  1:33 ` Laura Abbott
     [not found] ` < 201402121251.06280.arnd@arndb.de>
2014-02-12  1:33 ` [RFC/PATCH 1/3] of: Add early randomness hooks Laura Abbott
2014-02-12  1:33   ` Laura Abbott
2014-02-12 16:47   ` Grant Likely
2014-02-12 16:47     ` Grant Likely
2014-02-12 16:47     ` Grant Likely
2014-02-12  1:33 ` [RFC/PATCH 2/3] arm: Add ARCH_WANT_OF_RANDOMNESS Laura Abbott
2014-02-12  1:33   ` Laura Abbott
2014-02-12 16:49   ` Grant Likely
2014-02-12 16:49     ` Grant Likely
2014-02-12 16:49     ` Grant Likely
2014-02-13  0:54     ` Laura Abbott
2014-02-13  0:54       ` Laura Abbott
2014-02-13  0:54       ` Laura Abbott
2014-02-12  1:33 ` [RFC/PATCH 3/3] init: Move stack canary initialization after setup_arch Laura Abbott
2014-02-12  1:33   ` Laura Abbott
2014-02-12 11:51 ` [RFC/PATCH 0/3] Add devicetree scanning for randomness Arnd Bergmann
2014-02-12 11:51   ` Arnd Bergmann
2014-02-12 11:51   ` Arnd Bergmann
2014-02-12 17:45   ` Jason Cooper
2014-02-12 17:45     ` Jason Cooper
2014-02-12 17:45     ` Jason Cooper
2014-02-12 18:13     ` Olof Johansson
2014-02-12 18:13       ` Olof Johansson
2014-02-12 18:13       ` Olof Johansson
2014-02-12 18:32       ` Jason Cooper
2014-02-12 18:32         ` Jason Cooper
2014-02-12 18:32         ` Jason Cooper
2014-02-12 18:17     ` Arnd Bergmann
2014-02-12 18:17       ` Arnd Bergmann
2014-02-12 18:17       ` Arnd Bergmann
2014-02-12 18:45       ` Jason Cooper
2014-02-12 18:45         ` Jason Cooper
2014-02-12 18:45         ` Jason Cooper
2014-02-12 19:12         ` Arnd Bergmann
2014-02-12 19:12           ` Arnd Bergmann
2014-02-12 19:43           ` Jason Cooper
2014-02-12 19:43             ` Jason Cooper
2014-02-12 23:55           ` Rob Herring
2014-02-12 23:55             ` Rob Herring
2014-02-12 23:55             ` Rob Herring
2014-02-12 18:20     ` Jason Gunthorpe
2014-02-12 18:20       ` Jason Gunthorpe
2014-02-12 18:20       ` Jason Gunthorpe
2014-02-12 18:51       ` Jason Cooper
2014-02-12 18:51         ` Jason Cooper
2014-02-12 18:51         ` Jason Cooper
2014-02-17 15:54       ` Grant Likely
2014-02-17 15:54         ` Grant Likely
2014-02-17 16:13         ` Arnd Bergmann
2014-02-17 16:13           ` Arnd Bergmann
2014-02-17 16:13           ` Arnd Bergmann
2014-02-17 18:23           ` Jason Cooper
2014-02-17 18:23             ` Jason Cooper
2014-02-17 21:07             ` Geert Uytterhoeven
2014-02-17 21:07               ` Geert Uytterhoeven
2014-02-17 21:07               ` Geert Uytterhoeven
2014-02-18 17:56               ` Jason Cooper
2014-02-18 17:56                 ` Jason Cooper
2014-02-18 17:56                 ` Jason Cooper
2014-02-18  9:39           ` Grant Likely
2014-02-18  9:39             ` Grant Likely
2014-02-18  9:39             ` Grant Likely
2014-02-18 18:19         ` Jason Gunthorpe
2014-02-18 18:19           ` Jason Gunthorpe
2014-02-12 21:35     ` Kees Cook
2014-02-12 21:35       ` Kees Cook
2014-02-12 21:35       ` Kees Cook
2014-02-13  0:06   ` Laura Abbott
2014-02-13  0:06     ` Laura Abbott

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.