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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 DF46FC5DF60 for ; Fri, 8 Nov 2019 13:17:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A4DE42178F for ; Fri, 8 Nov 2019 13:17:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tvvl8IlB"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bRgco/j6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4DE42178F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WCyBQmKEQpibocCsACvriZcX8MiYoLnWMgsigJDHfPM=; b=tvvl8IlBX3T9oD +QQLSJOY2Gh2VT0H0wPEbAegIOxYO2s8n+8Igc9gr3rA9ZMF9J0QuW43F320nYRMGKfh1yACWWrl1 aufYB8CN4j1ZBUYB3ICTkQZ08RK5TAG7c1Uj7qR/TeZpZwZdJitzOCBJkVJz6Dmz6bLQ+DgYTvvwh fDYnMWVDhAjLmURDsVlTIGewk3uNlarMrTEta8Qf/t0b/Ub//UeAnsoQBTGrtOw+mC+JdzCbAddYC +BQo/QQfToBTqR4+GHHUu+3eSjXaCZ4JI97WyCngOYC6yLXjWmAdUzfjBSV/qB2FIf6ZoZSYAZ1C0 15/4gOSgj7WnFyac4SDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iT48f-0004Wf-8R; Fri, 08 Nov 2019 13:17:21 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iT3vg-0006Bm-Hu for linux-arm-kernel@lists.infradead.org; Fri, 08 Nov 2019 13:03:57 +0000 Received: by mail-wm1-x344.google.com with SMTP id q130so6167688wme.2 for ; Fri, 08 Nov 2019 05:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RD3rCfuQNE2f6lJThi4WImY0CO33DjtVpBFoOhDzKvA=; b=bRgco/j6fJMrPrbhgZZvBs1Cx7s60pHxKUupeQ9oSiAO+j59MSXWl5ZycYmUdl4N+n LBzf56vqaExjhUDzR7jxVXOldV7wJbk+AuIiSZSLxp5JfP32Cd1DbPVl3V7S4GUEJEnP 13G+dqk59eT7kGI4uHyXESl+fEq/UyX9sD45Z8DvOazsg5sJBGbhUjeDkqWA+gvOmpFG RYRfaoSjM93UVhHNudlSXaYwMW4I5+ICRg+hPm9efN2S4a7lbMEVD+lDu2JbOk8pIprH rt0r4IXHPz/l4pDogHC2pDCaN4phRztbjYx/BvT3ecuoATtLB3lw1yFgaBFPT8d6fv4h 1tzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RD3rCfuQNE2f6lJThi4WImY0CO33DjtVpBFoOhDzKvA=; b=rvASXSMo45/KVTPqT9eufEIngw4FjXm1gVMp42YY/C5UtZjg+uhsOryI2DgPbdwP9t EN23yG6B9M/o04ohHL3+/CxqwRlySGYEAnzZoPOUk2ELbTQitnUQDgPsgxsrTu7V2FaW dGTu2VomYx7IrlPUiKzUFXHdd1nzKIiZlhBizeIHrcRJ+XMyPpvts7d7NNbcMGaZf68R CohydN8g27amqxf3HMMFH1bScJ8DaNTmLGd02kPaYUvKKjGEA6a5NHIaamSRQXhHNkv1 CJek6RkNzKMPWhhK4LKljTGqozcsZaOew5+uib3FUYWev+jaSdfV3PWmVPN6mY8/FQkE Tmpw== X-Gm-Message-State: APjAAAVvJ67RSnGZ4Fna2nZEo7UijqhHhGKAUqOJ6t1JLU7i218oMAhD hRNCGqZGXuWxQfbQ2hd323AHS9j9jdQ3AYVFZfukaw== X-Google-Smtp-Source: APXvYqwVxXQ7j7sjMh42No+5ULXztDWEexSCaMNrkoPLsNQPovd1PYbjQHTIWgODnj/ocS5b09k5EQx7FekbMjHu+v4= X-Received: by 2002:a1c:64d6:: with SMTP id y205mr7605417wmb.136.1573218233883; Fri, 08 Nov 2019 05:03:53 -0800 (PST) MIME-Version: 1.0 References: <20191106141954.30657-1-rth@twiddle.net> <20191106141954.30657-2-rth@twiddle.net> <23ce309b-1561-ed95-7ce7-463a991bd19b@linaro.org> In-Reply-To: <23ce309b-1561-ed95-7ce7-463a991bd19b@linaro.org> From: Ard Biesheuvel Date: Fri, 8 Nov 2019 14:03:42 +0100 Message-ID: Subject: Re: [PATCH v4 1/1] arm64: Implement archrandom.h for ARMv8.5-RNG To: Richard Henderson , Marc Zyngier X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191108_050356_622145_10AACD85 X-CRM114-Status: GOOD ( 14.90 ) 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 , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 8 Nov 2019 at 12:10, Richard Henderson wrote: > > On 11/6/19 10:30 PM, Ard Biesheuvel wrote: > > On Wed, 6 Nov 2019 at 15:20, Richard Henderson > > wrote: > >> +static inline bool has_random(void) > >> +{ > >> + /* > >> + * We "have" RNG if either > >> + * (1) every cpu in the system has RNG, or > >> + * (2) in a non-preemptable context, current cpu has RNG. > >> + * Case 1 is the expected case when RNG is deployed, but > >> + * case 2 is present as a backup in case some big/little > >> + * system only has RNG on big cpus, we can still add entropy > >> + * from the interrupt handler of the big cpus. > > > > I don't understand the reference to the interrupt handler here. > > To add_interrupt_randomness(), invoked by handle_irq_event_percpu(). > Better if I reword the above to include the function name? > This is one of the several places where arch_random_get_seed_long() is called, so if you are going to single it out like that, it does make sense to clarify that. > > It is > > worth mentioning though that this arrangement permits > > rand_initialize() to use the instructions regardless of whether they > > are implemented only by the boot CPU or by all of them. > > Yes, I'll include that. > > > r~ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel