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.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_1 autolearn=unavailable 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 AD2FDC432BE for ; Fri, 6 Aug 2021 12:15:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D15361131 for ; Fri, 6 Aug 2021 12:15:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343642AbhHFMPV (ORCPT ); Fri, 6 Aug 2021 08:15:21 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:51754 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343589AbhHFMPU (ORCPT ); Fri, 6 Aug 2021 08:15:20 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1mBykc-0003hl-Nt; Fri, 06 Aug 2021 20:14:58 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1mBykW-0006fS-4A; Fri, 06 Aug 2021 20:14:52 +0800 Date: Fri, 6 Aug 2021 20:14:52 +0800 From: Herbert Xu To: Andre Przywara Cc: Matt Mackall , Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Ard Biesheuvel , Mark Brown , Will Deacon , Ali Saidi , Jon Nettleton Subject: Re: [PATCH v4 0/2] hwrng: Add Arm SMCCC TRNG based driver Message-ID: <20210806121452.GC25554@gondor.apana.org.au> References: <20210731204845.21196-1-andre.przywara@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210731204845.21196-1-andre.przywara@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 31, 2021 at 09:48:43PM +0100, Andre Przywara wrote: > The "Arm True Random Number Generator Firmware Interface"[1] provides > an SMCCC based interface to a true hardware random number generator. > So far we are using that in arch_get_random_seed(), but it might be > useful to expose the entropy through the /dev/hwrng device as well. This > allows to assess the quality of the implementation, by using "rngtest" > from the rng-tools package, for example. > > Patch 1 creates a platform device, triggered by the previous discovery > of the SMCCC TRNG service. > Patch 2 implements a hw_random platform driver, which is instantiated > through this said platform device. > > The driver can be loaded as module, or built into the kernel. > > [1] https://developer.arm.com/documentation/den0098/latest/ > > Changelog v3 ... v4: > - drop pointless driver loading message > - drop unneeded init() routine > > Changelog v2 ... v3: > - split platform device and driver > > Changelog v1 ... v2: > - fix building as a module > - de-register device upon exit > - mention module name in Kconfig > > Andre Przywara (2): > firmware: smccc: Register smccc_trng platform device > hwrng: Add Arm SMCCC TRNG based driver > > drivers/char/hw_random/Kconfig | 14 +++ > drivers/char/hw_random/Makefile | 1 + > drivers/char/hw_random/arm_smccc_trng.c | 123 ++++++++++++++++++++++++ > drivers/firmware/smccc/smccc.c | 17 ++++ > 4 files changed, 155 insertions(+) > create mode 100644 drivers/char/hw_random/arm_smccc_trng.c All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt