From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E67FC433E9 for ; Wed, 6 Jan 2021 09:56:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C6292310E for ; Wed, 6 Jan 2021 09:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727179AbhAFJ4C (ORCPT ); Wed, 6 Jan 2021 04:56:02 -0500 Received: from foss.arm.com ([217.140.110.172]:38140 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726824AbhAFJ4A (ORCPT ); Wed, 6 Jan 2021 04:56:00 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DFD711FB; Wed, 6 Jan 2021 01:55:14 -0800 (PST) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 044EE3F719; Wed, 6 Jan 2021 01:55:12 -0800 (PST) Date: Wed, 6 Jan 2021 09:54:32 +0000 From: Andre Przywara To: Mark Brown Cc: Will Deacon , Catalin Marinas , Ard Biesheuvel , Russell King , Marc Zyngier , Theodore Ts'o , Sudeep Holla , Mark Rutland , Lorenzo Pieralisi , Linus Walleij , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 4/5] arm64: Add support for SMCCC TRNG entropy source Message-ID: <20210106095432.26e5b86d@slackpad.fritz.box> In-Reply-To: <20210105170014.GG4487@sirena.org.uk> References: <20210105163652.23646-1-andre.przywara@arm.com> <20210105163652.23646-5-andre.przywara@arm.com> <20210105170014.GG4487@sirena.org.uk> Organization: Arm Ltd. X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 5 Jan 2021 17:00:14 +0000 Mark Brown wrote: > On Tue, Jan 05, 2021 at 04:36:51PM +0000, Andre Przywara wrote: > > > @@ -77,10 +117,20 @@ arch_get_random_seed_long_early(unsigned long > > *v) { > > WARN_ON(system_state != SYSTEM_BOOTING); > > > > - if (!__early_cpu_has_rndr()) > > - return false; > > + if (__early_cpu_has_rndr()) > > + return __arm64_rndr(v); > > + > > + if (smccc_trng_available) { > > + struct arm_smccc_res res; > > This still seems to be preferring RNDR over SMCCC for the early seed > unless I'm misreading the diff? Argh, my apologies for that blunder. I *did* change it, but must have lost it when rebasing against my debug patches. Will send a fixed version in a jiffy. Cheers, Andre.