Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3413348ybp; Sun, 6 Oct 2019 11:21:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqJnc0mDNv6gh3bhXCvXM1fNOPINxq8J/jZc8ibrDn72UqIs6VLiiGurjpK36Ksgq1mQsV X-Received: by 2002:a50:fa09:: with SMTP id b9mr25667493edq.165.1570386107783; Sun, 06 Oct 2019 11:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570386107; cv=none; d=google.com; s=arc-20160816; b=xw/X0j8kM22Nosfm2u6TI9pDYxmKhJEVTmv9H9pNPhaV6ZON4vCj/U1XlPoZjoZYY0 lyr9rfoJPuKJMNHWx2LNvzEkp6X2JlU+Tv8d15wwUNaJY85Bi9upe+zZQHIgjiVVrt9L SF8QeVUuvHIMif5x2HOa5k+KxzRfdqN8qV+Oyf48nZEvvf/fG0tkebuTUHtCqfmmCXnR zqA3LfY2L6oup512VcUyFKV5dWycU0ODQoEwInGUq4T7toWwMGZtnMM2UFfSK7581vkH Gu443ylLuJe6wIir+Ij98D0vqNFMwLE8w12/4Kuh2qMqwNa6l8i0aOtQnx3RjLK3kPJi 9n7g== 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=hFluPsVTYXCAuS0WTYVjy4APBlkrIvbqjyG8FY+12uQ=; b=okkD3o4fgY8ILMdpSo1SJrZtg0QWjzQbUVZLOLGQCXGY8W+rY8ZkG0h+q0f0KquTSx 1AnpjfFEMr9Kfj0L2hemz+FVKX+k1xb3Wbi4KUID2qVyqtI18TcdpfWmrsi7eS15PK6I hOm4FaCYVl3xaeYfll1udtohiu50ITgUkVLPQDLU3Z44GXu/xMYzaiS2ZXWkpfJKiVsq 3XLXmWgqVzCGHCjhKsUOGhpo3EIjQtniDZ3HMdgJIiL98GHjT3HJ4NbLbWxdC3zcAaDt SRuQqkR9BLkFGzDg42hgrHvLUc/7DC2Y779CpWiyyJOS93MqqsFOB49FPts7041i6uhi PiNA== 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 b3si5727357eju.357.2019.10.06.11.21.22; Sun, 06 Oct 2019 11:21:47 -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 S1726954AbfJFSVG (ORCPT + 99 others); Sun, 6 Oct 2019 14:21:06 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:55119 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbfJFSVG (ORCPT ); Sun, 6 Oct 2019 14:21:06 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 0C5C6804BD; Sun, 6 Oct 2019 20:20:48 +0200 (CEST) Date: Sun, 6 Oct 2019 20:21:03 +0200 From: Pavel Machek To: Linus Torvalds Cc: Thomas Gleixner , "Ahmed S. Darwish" , LKML , Theodore Ts'o , Nicholas Mc Guire , the arch/x86 maintainers , Andy Lutomirski , Kees Cook Subject: Re: x86/random: Speculation to the rescue Message-ID: <20191006182103.GA2394@amd> References: <20191006114129.GD24605@amd> <20191006173501.GA31243@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YiEDa0DAkWCtVeE4" Content-Disposition: inline In-Reply-To: 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 --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun 2019-10-06 11:06:38, Linus Torvalds wrote: > On Sun, Oct 6, 2019 at 10:35 AM Pavel Machek wrote: > > > > It will not: boot is now halted because systemd wants some > > entropy. Everything is idle and very little interrupts are > > happening. We have spinning rust, but it is idle, and thus not > > generating any interrupts. >=20 > Yes, but we have that problem now solved. >=20 > Except on embedded platforms that have garbage CPU's without even a > cycle counter. >=20 > But those won't have spinning rust anyway. >=20 > Yes, bad SSD's and MMC disks (that they do have) will generate timing > noise too, but in the absense of a cycle counter, that noise won't be > much use. 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. So we can just... issue read request on MMC while (!interrupt_done) i++ =20 =2E..and then use i++ as poor man's version of cycle counter. [We would not want to do that in normal operation, for obvious reasons, just when userland is blocked and waiting for entropy.] Hmm? Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl2aMI8ACgkQMOfwapXb+vJTywCgnfuEma9x9CxZe2Emi8/q3o88 fAAAn1UB+rc9fkjq94ygwBLuGjAtgcFo =qr1z -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4--