Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3371420ybp; Sun, 6 Oct 2019 10:28:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxImHiCdLlfNfBIE20RfyOiGOJpWl2iE7jLxEz4ccthMT3M1VC4Q+rl8quNMe7a/afyy3W2 X-Received: by 2002:a17:906:6bd5:: with SMTP id t21mr20701366ejs.128.1570382908917; Sun, 06 Oct 2019 10:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570382908; cv=none; d=google.com; s=arc-20160816; b=Vr6fXAjF3K5OCmkVoHDYKaDosJcB+oBbGzJgTZszbvNazSFQkLAe8TjJuZIVXWjfqa byVxObtQUgD9N5+ImQ/XXRRsvTFb4y1YmoP8N1SjzP79sM/8ASlwWA8piFqKu5FosV7P 1kjDa/M7FF7ISsCMLBNR7cATKjVYXMLiEBJnmryH75tdHqFIGVWBcjB1/mmECSBZ54qy Z+/NEUNcpm58NJptSFq9fyIdgp6FqCBu6hpLf8AyqRxil7VArx36fwmN27xZnnYnolva 4cd2hhxNUa3Mvkz9YUELdQiMjA/ApWSDxiLcHlsgdR3EGcqAZyu3rXyFEJRZHe1J9vr8 sgBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LD/QuvpU5V35ufYWzjU9v/JEj2qpuPjp0dtITIN3rWA=; b=jQBHpAhhiBGB3Bfud68UWmkRDEfsqVM7csjuVNADErJxapOeT4JsBrmn+0/B1HVCWu TBwQZ7h/VsV9oARKTzBIFfmjvTmBJJSBfqZX2aXgGaxcg6a0R2a0QBbEjjHXGB6SFje7 m7wQK7izaSZPG2wz+gV+UBB85OvkwDse3TrpXZi/G4pJpyUgq/0D7dxs2LZEn1Iyaa+C RS+k83QT86OArE6qhDzQecrvGAgfmzeMH3+bBC3gB8DE9sSz3kP1NLzp1FVVYqbUS8CT gOIt1L/NwVxFB39re5sMQUpioGDWHvwXH1uisP3suBA/BTY92wSK+P1Felv249K/zP59 ap3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=S3MM3D6s; 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 o12si7412693edc.279.2019.10.06.10.28.05; Sun, 06 Oct 2019 10:28:28 -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=pass header.i=@linux-foundation.org header.s=google header.b=S3MM3D6s; 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 S1728347AbfJFR0q (ORCPT + 99 others); Sun, 6 Oct 2019 13:26:46 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:44436 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728301AbfJFR0k (ORCPT ); Sun, 6 Oct 2019 13:26:40 -0400 Received: by mail-lj1-f193.google.com with SMTP id m13so11194895ljj.11 for ; Sun, 06 Oct 2019 10:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LD/QuvpU5V35ufYWzjU9v/JEj2qpuPjp0dtITIN3rWA=; b=S3MM3D6smPa34vOHPfluicJiARO1dDKcvC12PGnfAAyaGefJ4znW1MqRiG0lyXEU/N IBGtypKWSuuEf4QshUzI3pxZ5iN7ZDxdj1pbU+MkBGPVJyz89XvqwPwPCV9z4IEN7iwY XkArmwPd29c0YIJ7FsefqMhPuO2V2MntkyEfA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LD/QuvpU5V35ufYWzjU9v/JEj2qpuPjp0dtITIN3rWA=; b=GFIijxIoR4u3ZOTq2QaoUhWrNjDVTu0v3GxJaaKvP6aILK/IB4RkgljP1F5C7PRjqg xbmDHBESItrA76ZNiSSAmReloHmg9EWNoLRsX0CetY/mG7mFME1hY7J5X7+2iZm78LML Bdk6EFPshLwG1AZbvK4KnyxpsaSMNKq5QWbtnYYVy5ZOUwX1PmVt0Xj2JGTfi0EfqyJo 31uo9gDkkj5Or5tO6b4L5bB+Sdv3pEZxwxMmP0bQXS75WfkHVtW0lXbVyMn04rdjgwMd 1sxEuZV+uBX3UxLGP0nbIx01McGZ7nRCb/qZcaRVIyL+zafacWlj8RAtia/3xKL9Vpas EAbw== X-Gm-Message-State: APjAAAUb+yOJS6JkHzdKYU0W+tNb/AoYkyIYIMJQVe5+hFPsVNEtyRHY CiRwG5i/RlZrp/2QU0CDrInErPKq8WY= X-Received: by 2002:a2e:7212:: with SMTP id n18mr15478369ljc.91.1570382797153; Sun, 06 Oct 2019 10:26:37 -0700 (PDT) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id c26sm2252690lfp.20.2019.10.06.10.26.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Oct 2019 10:26:36 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id 7so11227219ljw.7 for ; Sun, 06 Oct 2019 10:26:35 -0700 (PDT) X-Received: by 2002:a2e:2e17:: with SMTP id u23mr16048856lju.26.1570382794914; Sun, 06 Oct 2019 10:26:34 -0700 (PDT) MIME-Version: 1.0 References: <20191006114129.GD24605@amd> In-Reply-To: <20191006114129.GD24605@amd> From: Linus Torvalds Date: Sun, 6 Oct 2019 10:26:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: x86/random: Speculation to the rescue To: Pavel Machek Cc: Thomas Gleixner , "Ahmed S. Darwish" , LKML , "Theodore Ts'o" , Nicholas Mc Guire , "the arch/x86 maintainers" , Andy Lutomirski , Kees Cook Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 6, 2019 at 4:41 AM Pavel Machek wrote: > > Should we have some kind of notifier chain, so that we could utilize > better random sources (spinning rust) if we had them? The spinning rust will get entropy on its own just thanks to the regular interrupt stuff. And the kernel tryin gto do IO is a bad idea. Plus I think it's kind of pointless to do anythign at all for things like spinning rust in this day and age. It's no longer relevant, and never really was in the area where this was a problem. Also, I don't really like the notion of random (sic) notifiers that different drivers or things could attach to this thing. People will disagree about how much entropy it has anyway, and I'd rather have _one_ clear implementation that people can look at and comment on and try to actually write an academic paper on and suggest improvements to, than some generic "entropy notifier interface" that then gets whatever input somebody decides is appropriate. We already have interfaces for "I think I have interesting data": add_interrupt_randomness(), add_device_randomness(), add_hwgenerator_randomness() are all for different sources of entropy. Linus