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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 6E68CC33CB1 for ; Wed, 15 Jan 2020 14:01:46 +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 3B3072465A for ; Wed, 15 Jan 2020 14:01:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QrRLjaI6"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sirena.org.uk header.i=@sirena.org.uk header.b="hrL2uWus" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B3072465A 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+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-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=CPoyqXX+Jo5T0bh9cAhsXZLWK/qAuKPRyNK8v5arnSM=; b=QrRLjaI6FEfiay1O6W2mrxwMz lSWhKGQdu1Yw+iGuJhDEcDKZNLFD+7886mezQYzYnuSX5qYSCkJYJIGVm6JGHWzsJ2EO1/vYm1amG PzFKCl/kLiOgfjjDyKQHBPpXWVP+ts+H7iYckKblMFvOsYtZgcaBG2LLbNoP0rQaiiP9H0sRwbNKD qlLwqmSrnMxCfJ8mvdcE0AEdTg9V0NXOlpRT3gX/V8NBvIzKDnUEwW2/CEJ+PVxwrBRUEXQuWwswq DEwdBuQN0JQmq0944B/a59xNozgELSPjNzN3xVWq6zRwvZb34/NBSXnmyujdqfKz8w/ICYoU3Ee6l 96aSiq9ow==; 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 1irjEv-0004DI-0y; Wed, 15 Jan 2020 14:01:45 +0000 Received: from heliosphere.sirena.org.uk ([172.104.155.198]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1irjEo-0004BM-NY for linux-arm-kernel@lists.infradead.org; Wed, 15 Jan 2020 14:01:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2g0OZmj7279HnAtQuen2D66A7Q04pVZhPkLtfyOVtxs=; b=hrL2uWus1R6i6shgruMu6N2aV cGcBW5FzqpFmzT0+E9sMRboY9IpkNgsmEDDIb1zurreautWt5r9KL4iSMa+qxIo/hWK/c7LOEeNFb zvA134FjYYzPxNqE19Ez9Gjydy6vdtzW3tWxlx4IL0MKhIzAvhWLS0RywNAEU9DzBcZ2Y=; Received: from fw-tnat-cam5.arm.com ([217.140.106.53] helo=fitzroy.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1irjEk-0005qh-Lw; Wed, 15 Jan 2020 14:01:34 +0000 Received: by fitzroy.sirena.org.uk (Postfix, from userid 1000) id D2F0DD01965; Wed, 15 Jan 2020 14:01:33 +0000 (GMT) Date: Wed, 15 Jan 2020 14:01:33 +0000 From: Mark Brown To: Mark Rutland Subject: Re: [PATCH v10 2/3] arm64: random: Add data to pool from setup_arch() Message-ID: <20200115140133.GI3897@sirena.org.uk> References: <20200110122341.8445-1-broonie@kernel.org> <20200110122341.8445-3-broonie@kernel.org> <20200115091615.GA21692@willie-the-truck> <20200115101107.GA32549@lakrids.cambridge.arm.com> MIME-Version: 1.0 In-Reply-To: <20200115101107.GA32549@lakrids.cambridge.arm.com> X-Cookie: Programming is an unnatural act. 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-20200115_060138_767154_905B463D X-CRM114-Status: GOOD ( 16.50 ) 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: Catalin Marinas , Richard Henderson , Will Deacon , linux-arm-kernel , Ard Biesheuvel Content-Type: multipart/mixed; boundary="===============1140870131234187625==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1140870131234187625== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1IYcr18XUmgwOrO2" Content-Disposition: inline --1IYcr18XUmgwOrO2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 15, 2020 at 10:11:08AM +0000, Mark Rutland wrote: > On Wed, Jan 15, 2020 at 10:22:03AM +0100, Ard Biesheuvel wrote: > > In a previous iteration, we did have a functional > > arch_get_random_seed_long() early on, which would solve this issue > > without even needing a patch like this. > It meant that the common runtime path had code that was only ever meant > to run at boot time, and would also run on secondary CPUs until we > finalized the caps, so they'd behave inconsistently across boot and > hotplug paths. I was concerned that this was messy and would be painful > to reason about and debug. > My suggestion was that we either: > (a) Had the arch code explicitly inject the entropy in the primary setup > path, as these patches do, or; These patches don't quite do that, they inject data but not entropy so anything that is waiting for the pool to become fully initialized will still end up waiting, though we do still get the data mixed in. There is currently no interface which allows one to explicitly inject entropy as though from the architecture and I'm not convinced that having one would be a good idea. > (b) Had a new callback (e.g. __early_arch_get_random_seed_long()) that > the core random code only called during its initialization, separate > to the runtime paths. This is definitely an option, but it is a bit ugly and as things stand with random.c it would I think have to cope with possibly running with multiple processors at which point we start to get back to the complexity you were originally worried about just in a code path that's less commonly executed. --1IYcr18XUmgwOrO2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl4fGzkACgkQJNaLcl1U h9D4+gf7BUxNjlpu9HM3NV2f7maJmLjMBhW1wsOuJcezPg5kluW4rEIgaiaxl0ix DCjZ9tQ1KhShGWe+G1sLYj40qD4iEfw45cSPQOD4ZDa/Ytu5CP5qWCe4tvLYza8W v+I5HKfYjBf3zUWP6G/McCv2iXYmUmaZCThAhy+gwKwrb2dLZ+p7tuQCegxUsGpF s0ReOa4GQgjGINlCq2Zh+nZvyiCawA2uAL36uW8YnkwL+15+qfvYk5t1sDXISyv/ pFEEQ4SjXUxBZ7IcKW7fZLcgNVoeRlV2kxRp5JeXC/di/Zf8OcGMH2n6pFECq6sD Fg+LHYLWmgqH/dht55S0/AcBNmuSHw== =NplI -----END PGP SIGNATURE----- --1IYcr18XUmgwOrO2-- --===============1140870131234187625== 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 --===============1140870131234187625==--