]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/xen: Relax requirement for RDRAND
authorMichalis Pappas <michalis@unikraft.io>
Fri, 4 Oct 2024 09:57:26 +0000 (11:57 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Wed, 4 Dec 2024 15:24:38 +0000 (15:24 +0000)
Enabling cpu-generated randomness by default breaks execution on
legacy x86_64 CPUs that don't support RDRAND. Update config to
enable CPU-generated randomness conditionally to the selection
of libukrandom.

In x86_64 libukrandom will seed the CSPRNG using RDRAND if the CPU
implements these instruction, unless LIBUKRANDOM_CMDLINE_SEED is
selected in the config.

On arm64 libukrandom will check if a device-tree is provided and
if a seed is set in the `/chosen/rng-seed` property, and otherwise
fall back to RNDR / RNDRRS if the CPU implements FEAT_RNG.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Maria Pana <maria.pana4@gmail.com>
Reviewed-by: Alex Apostolescu <alexx.apostolescu@gmail.com>
Reviewed-by: Simon Kuenzer <simon@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
GitHub-Closes: #1496

plat/xen/Config.uk

index 6e574fdd712042829c6167a9c9b1f358aafdf8aa..b83b100651a547b57a0a7a7be990547634c31a2b 100644 (file)
@@ -14,13 +14,11 @@ menuconfig PLAT_XEN
        select LIBUKRELOC if OPTIMIZE_PIE
        imply LIBUKOFW if ARCH_ARM_64
        select HAVE_INTCTLR
-       select HAVE_RANDOM
        imply LIBUKINTCTLR_GICV3 if ARCH_ARM_64
        imply LIBXEN_NETFRONT if LIBUKNETDEV
        imply LIBXEN_9PFRONT if LIBUK9P
        imply LIBXEN_BLKFRONT if LIBUKBLKDEV
        imply LIBXEN_CONSOLE
-       imply LIBUKRANDOM if HAVE_RANDOM
        help
                 Create a Unikraft image that runs as a Xen guest