Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: suzuki.poulose@arm.com, Catalin Marinas <catalin.marinas@arm.com>,
	ard.biesheuvel@linaro.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v8 2/3] arm64: random: Add data to pool from setup_arch()
Date: Wed, 8 Jan 2020 17:36:54 +0000	[thread overview]
Message-ID: <20200108173654.GC4036@sirena.org.uk> (raw)
In-Reply-To: <20200108172041.GI49203@lakrids.cambridge.arm.com>


[-- Attachment #1.1: Type: text/plain, Size: 879 bytes --]

On Wed, Jan 08, 2020 at 05:20:41PM +0000, Mark Rutland wrote:
> On Tue, Jan 07, 2020 at 06:35:39PM +0000, Mark Brown wrote:

> > +	/* Add multiple values to mirror the generic code. */
> > +	for (i = 0; i < 16; i++)
> > +		if (__arm64_rndr(&val))
> > +			add_device_randomness(&val, sizeof(val));
> > +}

> Given the next patch also needs to check the I reckon it is worth
> factoring the ID register check into a helper:

> /* Used on the boot CPU before the CPU feature framework is up */
> static inline bool __init __early_cpu_has_rndr(void)
> {
> 	unsigned long ftr = read_sysreg_s(SYS_ID_AA64ISAR0_EL1);
> 	return (ftr >> ID_AA64ISAR0_RNDR_SHIFT) & 0xf;
> }

There was also some suggestion about making a generic helper that takes
the register and bitfield to look at.

At some point I do also start to question if we're really winning with
all this stuff static inline...

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-01-08 17:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 18:35 [PATCH v8 0/3] ARMv8.5-RNG support Mark Brown
2020-01-07 18:35 ` [PATCH v8 1/3] arm64: Implement archrandom.h for ARMv8.5-RNG Mark Brown
2020-01-08 17:18   ` Mark Rutland
2020-01-07 18:35 ` [PATCH v8 2/3] arm64: random: Add data to pool from setup_arch() Mark Brown
2020-01-08 17:20   ` Mark Rutland
2020-01-08 17:36     ` Mark Brown [this message]
2020-01-07 18:35 ` [PATCH v8 3/3] arm64: Use v8.5-RNG entropy for KASLR seed Mark Brown
2020-01-08 17:21   ` Mark Rutland
2020-01-08 17:38   ` Ard Biesheuvel
2020-01-08 17:44     ` 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=20200108173654.GC4036@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=richard.henderson@linaro.org \
    --cc=suzuki.poulose@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