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.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 30287C433E0 for ; Wed, 6 Jan 2021 09:55:21 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 6F6E123104 for ; Wed, 6 Jan 2021 09:55:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F6E123104 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 973664B33D; Wed, 6 Jan 2021 04:55:19 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LtEaZOHLXrlH; Wed, 6 Jan 2021 04:55:18 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 7D78B4B30E; Wed, 6 Jan 2021 04:55:18 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 013C54B30E for ; Wed, 6 Jan 2021 04:55:17 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wnDlCs4jNc-I for ; Wed, 6 Jan 2021 04:55:15 -0500 (EST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AD64A4B30A for ; Wed, 6 Jan 2021 04:55:15 -0500 (EST) 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 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 Cc: Lorenzo Pieralisi , Theodore Ts'o , Catalin Marinas , Linus Walleij , Sudeep Holla , linux-kernel@vger.kernel.org, Russell King , kvmarm@lists.cs.columbia.edu, Marc Zyngier , Will Deacon , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm