mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrea Righi <andrea.righi@canonical.com>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: head: rely on CONFIG_RANDOM_TRUST_CPU
Date: Wed, 17 Aug 2022 16:17:21 +0200	[thread overview]
Message-ID: <Yvz4ccSO+BhICmyE@arighi-desktop> (raw)
In-Reply-To: <YvzqLFDuXtDRxilZ@sirena.org.uk>

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

  reply	other threads:[~2022-08-17 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17  9:46 Andrea Righi
2022-08-17 13:16 ` Mark Brown
2022-08-17 14:17   ` Andrea Righi [this message]
2022-08-17 13:51 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yvz4ccSO+BhICmyE@arighi-desktop \
    --to=andrea.righi@canonical.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®