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 4868EC32771 for ; Wed, 15 Jan 2020 17:05:14 +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 1D3A6214AF for ; Wed, 15 Jan 2020 17:05:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Dne4KXGo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sirena.org.uk header.i=@sirena.org.uk header.b="Ha/pQLqR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D3A6214AF 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=0i+YnL86BFmu98kee24sQkVOWEpXr2QG4u1mcvsh2/Q=; b=Dne4KXGo4GGsUnSfAKIrECgYL LCtBfPfq6ckRYrq4is9VxcfYjvnOH/hDFrJLK5hYAYZPhtXopM6gHMICDddimXpYyR565bD4ePzzh dGebjqJFW7poivXN+kFP6B1xE8qzY2G0lG/Kx1b3wZVQ0sP1q6i3lI2B9z+l+E03V/yrPzLMEgfEg N2yyLqBGVjsQhgKdfRX/hwyCB5Y0JYzi8PfZ3sleyhH/1LBgIxgofW64AEMDUdZ9bb3xtslYR6Muo CH6d0poMXCdRQA0baLBagbx/7/6Qznw1FLg94k7zBwlge8FlcLMUxYy2ywpptW+vFzMk0afrc7ipJ fQnS+p9Ow==; 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 1irm6T-00058O-Bw; Wed, 15 Jan 2020 17:05:13 +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 1irm6J-0004Fp-8o for linux-arm-kernel@lists.infradead.org; Wed, 15 Jan 2020 17:05:11 +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=x+xAJXH45h4BBJG7WofrfM0gVPqK436uCaNJFEbFt0o=; b=Ha/pQLqRNX9k4j0qooSUTZ4HI vRyWJt0/frKEMmwMjPT43rgocn4c/uEBSpA0SpLClJn4zDLYIxdTw8ohzmK4DiL+3yxg4dBdVgw8S mwby2mJa6xiEZ/rOVrCtWKaPZlVXWIonVDOB+MT+TmNOEnT7rkDKSnehqWdJDZQhURZtU=; Received: from 188.31.192.185.threembb.co.uk ([188.31.192.185] 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 1irm6G-0006bP-3j; Wed, 15 Jan 2020 17:05:00 +0000 Received: by fitzroy.sirena.org.uk (Postfix, from userid 1000) id 6C5C5D02009; Wed, 15 Jan 2020 17:04:59 +0000 (GMT) Date: Wed, 15 Jan 2020 17:04:59 +0000 From: Mark Brown To: Ard Biesheuvel Subject: Re: [PATCH v10 2/3] arm64: random: Add data to pool from setup_arch() Message-ID: <20200115170459.GM3897@sirena.org.uk> References: <20200110122341.8445-1-broonie@kernel.org> <20200110122341.8445-3-broonie@kernel.org> <20200115091615.GA21692@willie-the-truck> <20200115120703.GH3897@sirena.org.uk> <20200115124238.GF21692@willie-the-truck> MIME-Version: 1.0 In-Reply-To: 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_090507_227552_BFDDAA14 X-CRM114-Status: GOOD ( 18.23 ) 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 , Catalin Marinas , Richard Henderson , Will Deacon , linux-arm-kernel Content-Type: multipart/mixed; boundary="===============4136628149613497372==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4136628149613497372== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="t3tFFy74pA5/PEcJ" Content-Disposition: inline --t3tFFy74pA5/PEcJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 15, 2020 at 02:36:32PM +0100, Ard Biesheuvel wrote: > On Wed, 15 Jan 2020 at 13:42, Will Deacon wrote: > > I'd also really like Ard's ack on anything relating to RNGs. > Patches #1 and #3 are fine with me, modulo the HWCAP bit which I don't > deeply care about. > But the way this patch works around our workaround for mismatched RNG > caps between cores doesn't make sense to me. I'd be totally happy to drop patch 2 entirely, it's a *bit* marginal if it's useful - I mainly wrote it because it's so trivial to do not because I think it's a wonderful idea. > arch_get_random_seed_long() should just have some out of line __init > path that gets invoked only during early boot, exactly how we are > using it in patch #3 to seed KASLR, where we don't care about whether Yes, I think that would be a good place to get to if we can - if the early init thing is a separate call then we have to worry about the callers always running from the right context which sounds like trouble. It's just trying to figure out a way to write things which is clearly robust when looking at the arch code by itself, and I don't want to completely discount the possibility of a new interface from the random code to help with that yet. > or not other CPUs have the extension. (Note that rand_initialize() is > called very early, way before the point where we have to care about > being scheduled from a CPU with RNG to one without) Everything is simple during rand_initialize(), though the actual calls to get entropy that it does happen in crng_initialize() which is also used to initialize the per-node pools for NUMA systems but that should happen after the capabilities code has run I think (pretty sure, but I need to check) so we can rely on cpus_have_const_cap(). There's also calls in prandom_init() which runs at core_initcall() so that should be fine too. --t3tFFy74pA5/PEcJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl4fRjcACgkQJNaLcl1U h9Do6Af/XokI/0IdQrHyYCXT4t/XmX6pHMidjoIFHbuQPFXJMsRupx0vJecBVZnb LNVIMgzl6cCA5xgIVKQ/N5KouuENBKtAhhotOqYq7wjUM7j7P2idtnsFEpbLgSK2 P5q6/R4jIYMPHIn+l/b31BZKqHQ3lKQZHGdh6+QbEgBaTYCd8iB5ua2qYINiger3 RasZowUy2VNs7Ez7RrYyDC6hPge35pAAeOIst+J+gQ3WM24QXtvVX7qkW/ST6K77 xzKbQLGBjmdofbu5SeLi/XoxO0Db4om5Iwz3kBAYhrUcSu5XKN1xAth5nv9k/sfr ch4X9ySwxLEk9QztwbDYtT3k6ZFfxw== =NwpF -----END PGP SIGNATURE----- --t3tFFy74pA5/PEcJ-- --===============4136628149613497372== 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 --===============4136628149613497372==--