Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp604363pxt; Fri, 6 Aug 2021 09:15:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVPp3z3bC+bFoJMLpD1JbFWnQsp4P66WcoH8QNQ1ZqtUJD6nU4FLatIyI+chJVF9pvlHp6 X-Received: by 2002:a05:6602:25da:: with SMTP id d26mr647713iop.106.1628266534504; Fri, 06 Aug 2021 09:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628266534; cv=none; d=google.com; s=arc-20160816; b=D2y8gQHYF2h3am/+Bc7+Prhgj0ZPrqZHyWTfvatTBKKc/metthenfbcbSGOeXUNiv+ 9s3I756y1k87wQdcP/rjGdT242OoRQMJR9oNaJdGJCNsGSTJyeL6a0bf7VrKt8WumHry exDXXpJJFliKiXKKlZQ3PULRO9l7J1e9ggGcCbvvgYOnomcshMPLkzbA4CGz+7CSqh5w NBDgQtH415d4cHpLkcB8bLR/tfmQqjpjWkrE3djCQ4FD+BuuSCmnqC5OL+n0bejRMWTO ZRUwwDzODAlllyhTITXEopHt/sQaKzZxmyo2CMYIAXfGAf2S6IgwwojYMumyw+9UfySz UNvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=arntFUfYU4So6BKs35BPY0OjMqksy5m9yWNYjvfLv24=; b=I7JxaKBermyckqxqQbxcqzfJZTCtuFycdP1t/KFHoX1tMEE+SFA54iNz8hYf75tVzd 6jg2/dH96HFxtAH+PhpM5pH9LJAUDZngZm4LSO/qE+KtU/Rw7qnd7EnL2w96z9NKtqmj sPGzttfEstl5LC9zYueSqb1cI2Yg6CSzQl49FGpM/K2i/TsAg7fh0PNVlBi1wca3O9gg FyWl5z1k/aKTOaAx3rMwlXHHmZd4CNpkAEhiPbX247eW80DyHX9qQ9G6D2nZsAaK8wg1 UVdzJaS106uRtFJhDhm3FmsdqsmLG5hJJIAuJnZD4MZdjmH2z9V3MACOnmuETqKbzy/J VpIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si8701721ilj.0.2021.08.06.09.15.23; Fri, 06 Aug 2021 09:15:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343635AbhHFMPU (ORCPT + 99 others); Fri, 6 Aug 2021 08:15:20 -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-crypto@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