libxl/arm: provide guests with random seed
authorSergiy Kibrik <Sergiy_Kibrik@epam.com>
Tue, 6 Jul 2021 06:33:45 +0000 (06:33 +0000)
committerJulien Grall <jgrall@amazon.com>
Tue, 6 Jul 2021 08:47:33 +0000 (09:47 +0100)
commit33e48312cf28f6fb78c03b14514fa7718de97ef5
tree59f58fe5f50eefe8c2dca2e1d5c2cc1885402c17
parent44e8904ebfbc57ba0950c40b9d3a28507b553e4e
libxl/arm: provide guests with random seed

Pass 128 bytes of random seed via FDT, so that guests' CRNGs are better seeded
early at boot. This is larger than ChaCha20 key size of 32, so each byte of
CRNG state will be mixed 4 times using this seed. There does not seem to be
advantage in larger seed though.

Depending on its configuration Linux can use the seed as device randomness
or to just quickly initialize CRNG.
In either case this will provide extra randomness to further harden CRNG.

Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com>
Reviewed-by: Julien Grall <julien@xen.org>
Reviewed-by: Michal Orzel <michal.orzel@arm.com>
tools/libs/light/libxl_arm.c