Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7165614ybn; Mon, 30 Sep 2019 09:34:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqw0ouBz6O+lMM56va+P7JggVZ6myNJV48wNBmQu3vR4ofEvwdJCi5LakETv0wlQMSJjxyHJ X-Received: by 2002:a17:906:fac5:: with SMTP id lu5mr20224541ejb.71.1569861270122; Mon, 30 Sep 2019 09:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569861270; cv=none; d=google.com; s=arc-20160816; b=DYQC9EXUVw4wNwhHvtFUqp+NwlOqYB+647TkZhvlgxKYhtMG3gYh0q2hwVvRZaY6BO 85lz4dLkrA4sSNEWphDA27BBmGFa5lcDAGEqhUqiwDDduzT7daA6pSgzKK5xYzncBFfE DPEMPMZvi/wzMJHincPTViUZZBCjZNQEWXteuELJ0V1Xj4uPAJN2WDTVsUdDRPrm4ZFC B+sGWw2N0M3RGt/i5lsWUKNUM54iac8jxYJQGcxZRqLMOtMMAwX59tR0/LnUhZA9NVEE cLJEn/x72SiTJTgcsELAzeyIBy9n4PySkK4Ba6TSh9FOjukySW6O2aK8OUZqin5DrRjZ H9Ng== 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:dkim-signature; bh=8Ng1o01VoSIGifSBStGW3u8rPP0a8SwwC6yHPSZlmuQ=; b=u37xYjGvvcPR6QULxhmOi3oJXeT+xkq7/sd765oK5d0DQiTp0OaCXOls78d4qUn3TT fSTIe53q7fOzkNhJcsfwDUvXYZXMAYi/7k/U7awdlC5kst5trqfQonqAAlyqEuY4741P zTZOrB5F9sUL3GvO4nQbjkJrsdqRu2dxqwJKVVQPmrUjTBNJ2cxF3EP/bVwZGsMOat1K +sIlkFZ0D/5I3KRhGSZucpizOV2TJm5rxh4IuXS7G60hbzafUDP27O/q4xdSzOyJBe9v YwPviFbLJT/Wxz9FhdwPoZylg+OMMN275eUiKNNcu1wFTEpNYMih4oEGjHaBLICDHJGY EJaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=SXGwPHNr; 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 s24si7174926ejb.16.2019.09.30.09.34.04; Mon, 30 Sep 2019 09:34:30 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=SXGwPHNr; 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 S1732317AbfI3Qc3 (ORCPT + 99 others); Mon, 30 Sep 2019 12:32:29 -0400 Received: from merlin.infradead.org ([205.233.59.134]:55464 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727767AbfI3Qc2 (ORCPT ); Mon, 30 Sep 2019 12:32:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; 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=8Ng1o01VoSIGifSBStGW3u8rPP0a8SwwC6yHPSZlmuQ=; b=SXGwPHNrrgfhWNeRE+H80Dh5n 1ceMe1DoGzwAfcAGEucvLON9TDi75x2VKmikjAtdgMd83yazG6MRLsrO6aBXv11u3OiHp5KiigRlm 02e195xOrWEUWCpdA586D+K8jnoNfZwyQcs10MMg2zry1KQsM1/rNlKXDWWBSr3kvkZNbl2DS3NNG Yi3Vjfpuqg3WPKsFtuDWhQa4ne/y237OU4qzTt/jMabryc9hBuoOHkkkJkuKArfuNFbKMHqhxFl8V qDbZlRMmsNA30CEvMf35YhlNfHjA7TIp+QEJQX0zoGXOoEhE7pxe/3mJoG6u3QVsvPkRnsyAibpg1 8XgbBkhXw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.2 #3 (Red Hat Linux)) id 1iEyav-0006JZ-6j; Mon, 30 Sep 2019 16:32:17 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 51F18305ED5; Mon, 30 Sep 2019 18:31:27 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4B461265261B4; Mon, 30 Sep 2019 18:32:15 +0200 (CEST) Date: Mon, 30 Sep 2019 18:32:15 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: "Theodore Y. Ts'o" , 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: <20190930163215.GH4519@hirez.programming.kicks-ass.net> References: <20190930033706.GD4994@mit.edu> <20190930131639.GF4994@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 30, 2019 at 09:15:55AM -0700, Linus Torvalds wrote: > On Mon, Sep 30, 2019 at 6:16 AM Theodore Y. Ts'o wrote: > But it _also_ means that if you have a small and excessively stupid > in-order CPU, I can almost guarantee that you will at least have cache > misses likely all the way out to memory. So a CPU-only loop like the > LFSR thing that Thomas reports generates entropy even on its own would > likely generate nothing at all on a simple in-order core - but I do In my experience LFSRs are good at defeating branch predictors, which would make even in-order cores suffer lots of branch misses. And that might be enough, maybe.