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=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 23AFCC4741F for ; Thu, 5 Nov 2020 13:42:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D43420729 for ; Thu, 5 Nov 2020 13:42:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Zv+XEopS"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="j0S+M/t9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D43420729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hhKZQ4VhTDRdNb0iSMVTbLisqCSyDgHDzhDbhYbUIlw=; b=Zv+XEopS5ijYnj06EnNEOkrlN 3VJFcgvbDckEhDdyP9J10b1RfBpdLzFXinUUgsXJWUMiGVmdmyDhR770Brc6vnZfj/jWy+JuDiFnB wNVKGYHG2g3ekvbVe05AhJo7D33m1oYzb/KLKG6LIsggmZj46fJHT0aUt8uhKtbd5EX+XNFBoTrgx r/K3r9WtXPEOu6cLn50oVIhRwrIg3c26kSrQL+Da9C7uGvKmfT65LipJ7BxF8vvhdLhhiHJBIt6fj jiAkKidObeprDlVAO7pIz5SXQD78WRSGwA/ofK92k6Jy6oAtHhtmEnJfzfexCevCkHOXc6MicRtTh GMCfS6S3Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kafWW-00029p-Rr; Thu, 05 Nov 2020 13:41:56 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kafWU-00029N-Cj for linux-arm-kernel@lists.infradead.org; Thu, 05 Nov 2020 13:41:55 +0000 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CBB5F20729; Thu, 5 Nov 2020 13:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604583713; bh=4w//0GOBcyazzgOmqfL5NKULnMf1kmugV10nGsnPnCM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=j0S+M/t95EKp2myinviXxYBn/BVNlmZenfledxlLsLuLXYeNEUag6xwL4pHwW23yE CKLpj6aYbmL1uY8vflma3+jebsh3Rzddy8UhnShGvtINtt6rQPcSVhZpQYGil8i2uY Q20pR7IzGI7f6VesD8+v9DH4vegwrZx4D0ScIsJ8= Date: Thu, 5 Nov 2020 13:41:42 +0000 From: Mark Brown To: Andre Przywara Subject: Re: [PATCH v2 4/5] arm64: Add support for SMCCC TRNG entropy source Message-ID: <20201105134142.GA4856@sirena.org.uk> References: <20201105125656.25259-1-andre.przywara@arm.com> <20201105125656.25259-5-andre.przywara@arm.com> MIME-Version: 1.0 In-Reply-To: <20201105125656.25259-5-andre.przywara@arm.com> X-Cookie: It's the thought, if any, that counts! User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201105_084154_547756_0561DE89 X-CRM114-Status: GOOD ( 15.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Lorenzo Pieralisi , linux-kernel@vger.kernel.org, Catalin Marinas , Linus Walleij , Russell King , Ard Biesheuvel , Sudeep Holla , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============6454320797842007894==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6454320797842007894== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 05, 2020 at 12:56:55PM +0000, Andre Przywara wrote: > static inline bool __must_check arch_get_random_seed_int(unsigned int *v) > { > + struct arm_smccc_res res; > unsigned long val; > - bool ok =3D arch_get_random_seed_long(&val); > =20 > - *v =3D val; > - return ok; > + if (cpus_have_const_cap(ARM64_HAS_RNG)) { > + if (arch_get_random_seed_long(&val)) { > + *v =3D val; > + return true; > + } > + return false; > + } It isn't obvious to me why we don't fall through to trying the SMCCC TRNG here if for some reason the v8.5-RNG didn't give us something. Definitely an obscure possibility but still... --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl+kARUACgkQJNaLcl1U h9DYuwf8CUvDX3fgFkHQzB4oHxVc26hBdjs1LMP8HGSRCDcCKTl8g0oPmxO620Eg Gi7jDuTY0fyXAqxIJY6mqyAxuWwoEhN37zqHBqDKoIIQoqr7S2XenF+4PZauH7A/ 3/E8QnNxZCWUCZkgmjwa5GAa5Yt2SHNnZOXe4kx81SHBdMBcMgM4VnVS1eag/Rsu 5PZ/HFJQAB3PQQQ4+MtYkWqfurTTnQruH/sT1CxWa6WHbUWwStSsmtrbjwLx/3nz SHD1UXnMH5WycZQ55m++AGD9xzSZGFRlbgEcXltNPMg8ern/xeCt5EpCKl262D+I ujIYv72Mo/6CrpMqQrXsK7jzc5pHHg== =6PnH -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62-- --===============6454320797842007894== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6454320797842007894==--