[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yvz4ccSO+BhICmyE@arighi-desktop>
Date: Wed, 17 Aug 2022 16:17:21 +0200
From: Andrea Righi <andrea.righi@...onical.com>
To: Mark Brown <broonie@...nel.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64: head: rely on CONFIG_RANDOM_TRUST_CPU
On Wed, Aug 17, 2022 at 02:16:28PM +0100, Mark Brown wrote:
> 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.
Makes sense, in that case it'd be better to just remove the guard
completely, as mentioned by Will.
Thanks,
-Andrea
Powered by blists - more mailing lists