Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4864226ybp; Mon, 7 Oct 2019 15:21:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSyqT4EwFd9qagf4v6AoiJReUF5nJJFRZa7MENF9pQZhKCjQFmlzjc+Kp1W62n5PmgQjN8 X-Received: by 2002:a50:8a9a:: with SMTP id j26mr31299222edj.251.1570486889949; Mon, 07 Oct 2019 15:21:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570486889; cv=none; d=google.com; s=arc-20160816; b=emoDl9ctLHx6GOFgcwbsS23nAcDgehjSF03RDVDh5tzRPjdH8cfsMpYdF3lwAG9/LB cQqu4dP2KGg+XHusFOowP7DfijZlNokxGMrCKI2IrsjxG4HmG/dNppYoPCzup1vgm5DD iDTR05fyzSjdcuejf+8oef/ek5mdsRRzohMpOL1QV2XNCjScJgwT0fwcIBBp5ftV417N VmVgsmPFAfBpJR58W70raOhAmI2tInlgc213uata05PZ7peZiSPBLVmZAK/vLLqQu2FI lWvoytzclh4MnlbOxYRYoQTA+kwImeg64jz6/K7atKs2AMFJTrqZXbYc/jeBPBOQIg1Y dtOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Fg/ry+6oVgFQFo9CPchxyVmAJz35CKdzFPmyMtWq1iU=; b=gdlAxXItD08kczoVcXKzm/Fi+NPonc09MsBHHoOFuu3/c4uoNxQdywES0w0L2Z1BgX g0VCGsnukIo8aGNgS3sGiSK5Xv1G8UnV5QP4iIfwYeLCJAwINK1y8yqJOj7HF+NZANct nP/3+7yhR+EzKvL+P4TbTtkBuJ5Q2ePRZHj1O2EXt7OCT3E+Z05J3IFs6awGxiubqX2V 7pL+kXPs7KNh8HR1fLFVvUNZYYt4Dq9HgtOeO9yQFiNBsWBqbLl6t4R10v1OFw4RunW4 VXHWgOZYYElwHgAAJxFn1oD3FQRKY9lZ25tvJkE9o6cuIRG9FMgQ60aEce5JfpWYzdgb Qc6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dv21si7581330ejb.241.2019.10.07.15.21.06; Mon, 07 Oct 2019 15:21:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729437AbfJGWSW (ORCPT + 99 others); Mon, 7 Oct 2019 18:18:22 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:45632 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728654AbfJGWSV (ORCPT ); Mon, 7 Oct 2019 18:18:21 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 5045980555; Tue, 8 Oct 2019 00:18:03 +0200 (CEST) Date: Tue, 8 Oct 2019 00:18:17 +0200 From: Pavel Machek To: "Theodore Y. Ts'o" Cc: Linus Torvalds , Thomas Gleixner , "Ahmed S. Darwish" , LKML , Nicholas Mc Guire , the arch/x86 maintainers , Andy Lutomirski , Kees Cook Subject: Re: x86/random: Speculation to the rescue Message-ID: <20191007221817.GA4027@amd> References: <20191006114129.GD24605@amd> <20191006173501.GA31243@amd> <20191006182103.GA2394@amd> <20191007114734.GA6104@mit.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <20191007114734.GA6104@mit.edu> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2019-10-07 07:47:34, Theodore Y. Ts'o wrote: > On Sun, Oct 06, 2019 at 08:21:03PM +0200, Pavel Machek wrote: > > Even without cycle counter... if we _know_ we are trying to generate > > entropy and have MMC available, we don't care about power and > > performance. > >=20 > > So we can just... > >=20 > > issue read request on MMC > > while (!interrupt_done) > > i++ > > =20 > > ...and then use i++ as poor man's version of cycle counter. >=20 > I suggest that you try that and see how much uncertainty you really > have before you assume that this is actually going to work. Again, on > "System on a Chip" systems, there is very likely a single master > oscillator, and the eMMC is going to be on the the same silicon die as > the CPU. At least for spinning rust platters it's on a physically I have many systems including SoC here, but technology needed for NAND flash is different from technology for CPU, so these parts do _not_ share a silicon die. They do not even share same package. (Also RTC tends to be on separate chip, connected using i2c). Would you have an example of Linux-capable system where eMMC is on same chip as CPU? > P.S. Note that this Don Davis's paper[1] claims that they were able > to extract 100 independent unpredictable bits per _minute_. Given > that modern init scripts want us to be able to boot in under a few Well, for now I'm arguing that it is possible to gather entropy, not neccessarily that it is going to be fast. Still waiting minute and a half during boot is better than generating non-random keys. Linux already credits interrupts with some entropy, so all I really need to do is generate some interrupts. And "find /" generates lots of those on embedded systems. (Even with nfsroot as long as network card is not being polled...) Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --wac7ysb48OaltWcw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl2buakACgkQMOfwapXb+vIMKACfTYD726DRhIKO8U/fIqbhpkhb 6X0AnjicfyhZGiQk6WZBcx++vPb4LCtJ =U6l+ -----END PGP SIGNATURE----- --wac7ysb48OaltWcw--