mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Matt Mackall <mpm@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Mark Rutland <mark.rutland@arm.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	linux-crypto@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Ard Biesheuvel <ardb@kernel.org>, Will Deacon <will@kernel.org>,
	Ali Saidi <alisaidi@amazon.com>,
	Jon Nettleton <jon@solid-run.com>
Subject: Re: [PATCH v3 2/2] hwrng: Add Arm SMCCC TRNG based driver
Date: Tue, 27 Jul 2021 01:30:04 +0100	[thread overview]
Message-ID: <20210727013004.4caca28f@slackpad.fritz.box> (raw)
In-Reply-To: <20210726223738.GM4670@sirena.org.uk>

On Mon, 26 Jul 2021 23:37:38 +0100
Mark Brown <broonie@kernel.org> wrote:

> On Mon, Jul 26, 2021 at 06:56:10PM +0100, Andre Przywara wrote:
> 
> > +static int smccc_trng_init(struct hwrng *rng)
> > +{
> > +	return 0;
> > +}  
> 
> If this can be empty (looking at the core it seems like it can) then
> best just remove it.

Ah, you are right! Actually this is explicitly mentioned in the
struct hwrng comments. Thanks for the heads up.

> 
> > +	platform_set_drvdata(pdev, trng);
> > +	ret = devm_hwrng_register(&pdev->dev, trng);
> > +	if (!ret)
> > +		dev_info(&pdev->dev,
> > +			 "ARM SMCCC TRNG firmware random number generator\n");  
> 
> Is the log message needed given that we're not announcing any version
> information here or anything?  A brief sampling of other drivers
> suggests it's not a standard thing for the subsystem.

Yeah, that was indeed more a leftover of the version print. I
thought about querying the version again explicitly, but this would
have brought back the SMCCC calls that I could so nicely delete. Plus,
the hwrng driver is just a (secondary) user of this interface, I think
announcing the version should be done in smccc.c. Which is probably
beyond the scope of this patch.

Now thinking about this, there would probably be some value in making
the TRNG UUID somehow available, as this can be used to identify flawed
implementations (general problems in the hardware or backend bugs). But
this should be some query-able interface, rather than some line in
dmesg. Any ideas? Might be beyond the scope of this series, though...

Cheers,
Andre

  reply	other threads:[~2021-07-27  0:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 17:56 [PATCH v3 0/2] " Andre Przywara
2021-07-26 17:56 ` [PATCH v3 1/2] firmware: smccc: Register smccc_trng platform device Andre Przywara
2021-07-26 17:56 ` [PATCH v3 2/2] hwrng: Add Arm SMCCC TRNG based driver Andre Przywara
2021-07-26 22:37   ` Mark Brown
2021-07-27  0:30     ` Andre Przywara [this message]
2021-07-27  0:59       ` Mark Brown

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=20210727013004.4caca28f@slackpad.fritz.box \
    --to=andre.przywara@arm.com \
    --cc=alisaidi@amazon.com \
    --cc=ardb@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=broonie@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jon@solid-run.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=mpm@selenic.com \
    --cc=sudeep.holla@arm.com \
    --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®