[PATCH] arm64: head: rely on CONFIG_RANDOM_TRUST_CPU

Mark Brown broonie at kernel.org
Wed Aug 17 06:16:28 PDT 2022


On Wed, Aug 17, 2022 at 11:46:18AM +0200, Andrea Righi wrote:
> The CONFIG_ARCH_RANDOM .config option has been removed by
> commit 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM").
> 
> Depend on CONFIG_RANDOM_TRUST_CPU to determine whether we can rely on
> __arm64_rndr() to initialize the seed for kaslr.
> 
> Fixes: 9592eef7c16e ("random: remove CONFIG_ARCH_RANDOM")

> -#ifdef CONFIG_ARCH_RANDOM
> +#ifdef CONFIG_RANDOM_TRUST_CPU
>  		 if (!__early_cpu_has_rndr() ||
>  		     !__arm64_rndr((unsigned long *)&seed))
>  #endif

I think the sense here would be more that we should just unconditionally
use RNDR if it's present - previously we'd use the result even if we
didn't have strong trust in the CPU implementation and I don't see why
we'd want to change that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220817/1a3b37be/attachment.sig>


More information about the linux-arm-kernel mailing list