Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8593057ybn; Tue, 1 Oct 2019 10:16:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3jnejkAVv/5Bt9euJwiYuYcTH4MPPTmeCNkfTGUvvy67pAJ4By71jp6FZTzMkh05ArxUS X-Received: by 2002:a50:d556:: with SMTP id f22mr26261942edj.263.1569950177305; Tue, 01 Oct 2019 10:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569950177; cv=none; d=google.com; s=arc-20160816; b=YLZvZz2e702FKDnJi9XgC1/hGd8Z2wGCDPDiRJhD8XKtkiVKCyKVN++gVpA0qNIelO bapNFJ4H5ryyvQZWhZa5RDA5QQ+BumKf+0baGuBD161AZlsq+HxQmq3iK/ch0qSgMW/W fUQ0UBfXNCCogKvK8s4qN7+Qu7IV6AAv/D1WTHUn+lwH8HY6NtFBQLQcy4iDFelFRCuL gwi6xtDTnoWNwd5h6yModW1uG+thtagjkVgQ1vS2LFERbB3IPc7shhZ0Aoe3ORKRqD3g py5/ViMGs7c1r/4y6aBMdFpoTXOPweJkYc3+zGj3U6P+AcdF8W5frPGdjf2VduyEncFo AXaQ== 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=nEuCxhcjsGTl2dAs2lSougJ6NsHoyENBtaiEDpg0vW0=; b=x7a+J5V1c5bscaLHjT2zieAUodRY0UnxN28YIFK9BDRidIkOrndhDZV4H89+MxES4i OZj+ExaPF2k4OxJxgyxCmXP+Kc6bkKmGEaojoj6ImNfZVWrUM1TYzgp+kfurvemvaQum 0dJZeJbskakMzRFsIWVqULN7uTtKmiV4L5Vk5Ao6Ax10q/ocGN4jC8ITjntycxWCUQPZ Dx479GLXfB15rKCV0Tr+vmSpgM1ET7Ns+TuDqTg9PJ9wZemjmw74TSSHaQCwJ5nFt8j4 XIIQ7wrEtYXQAZoJkCciGllT9hq+CH1ews+CpJ4jGjpxQfdH4QQdlADNBKg86VKUEAbC Zc9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CAOrEjWf; 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 y10si9169801eje.50.2019.10.01.10.15.51; Tue, 01 Oct 2019 10:16:17 -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=CAOrEjWf; 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 S1729766AbfJARPA (ORCPT + 99 others); Tue, 1 Oct 2019 13:15:00 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:42681 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726905AbfJARPA (ORCPT ); Tue, 1 Oct 2019 13:15:00 -0400 Received: by mail-lf1-f67.google.com with SMTP id c195so10504542lfg.9 for ; Tue, 01 Oct 2019 10:14:59 -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=nEuCxhcjsGTl2dAs2lSougJ6NsHoyENBtaiEDpg0vW0=; b=CAOrEjWfrgxQe1kRn7vPNyNDDhxcOBYHgGpKgiFUvC+8Xh0bryCl/hbhQcREBq7Lqy Di8Nvc8kr3Fdq7b6vyveiKmeu5qc4iGpH0q5xoUQXQkYJhnbf5ha2ZaOQBPrhPXgLE8d HNVn8AUmqP4MQqP5rQ+BB5vG46fYP7i6BWsnA= 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=nEuCxhcjsGTl2dAs2lSougJ6NsHoyENBtaiEDpg0vW0=; b=kAGsyu+oA6aZmIg0uyRWAaig4TItus2AY0/fp2eNbyWVWm+aRiaAV5GWBPEuzixUWE VDSTM/xNJKC9ShqaccBXFOhblxDPaRBjZeYd/TwcvgzzR6oYzSMmT8TuBEQt1nAus27z 2z2tTWp5Zuqs9HwKiG7Ce9jttMnkBHaVacWUig4UwA7+TW8fA9+WlqdxZ4ES/NuwD6sD ESXKYrZlFQXqB11S5gs0tqLY4uRJfgeVoXgWvVLesQhnGD9p7LYkZACUs23CprsC2DLS L13yM25GwJ/wg6oDpHmXmFmQPk6fDtyV7sG4fv8uF67FFTOtWi6GwRc2UG4zt/F+Rzsh DxZg== X-Gm-Message-State: APjAAAVub7DZA5aLWJeuCXJD0MkC5x+RlRoSBXaKKw+R/1Eb6pwr0Otf w+RKq09zaLTaV0DehWXx7lPubN7NGEE= X-Received: by 2002:a19:ca07:: with SMTP id a7mr16872622lfg.181.1569950097981; Tue, 01 Oct 2019 10:14:57 -0700 (PDT) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com. [209.85.208.175]) by smtp.gmail.com with ESMTPSA id d26sm4100842ljc.64.2019.10.01.10.14.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Oct 2019 10:14:57 -0700 (PDT) Received: by mail-lj1-f175.google.com with SMTP id 7so14198426ljw.7 for ; Tue, 01 Oct 2019 10:14:56 -0700 (PDT) X-Received: by 2002:a2e:3e07:: with SMTP id l7mr16622987lja.180.1569950096519; Tue, 01 Oct 2019 10:14:56 -0700 (PDT) MIME-Version: 1.0 References: <20190930061014.GC29694@zn.tnic> <20191001135108.GD5390@zn.tnic> In-Reply-To: <20191001135108.GD5390@zn.tnic> From: Linus Torvalds Date: Tue, 1 Oct 2019 10:14:40 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: x86/random: Speculation to the rescue To: Borislav Petkov 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 Tue, Oct 1, 2019 at 6:51 AM Borislav Petkov wrote: > > So when I add this by hand and do git diff, it adds a second hunk: You and me both. We both have editors that always add line-endings, and right now that file doesn't have a newline at the end of the file thanks to commit 428826f5358c ("fdt: add support for rng-seed"). > and I kinda get what it is trying to tell me but this is new. And when I > do > > $ xxd drivers/char/random.c > .. > > 000125e0: 646f 6d6e 6573 7329 3b0a domness);. > > there's a 0xa at the end so what's git really trying to tell me? The previous state of the file didn't have that 0xa at the end, so you get that -EXPORT_SYMBOL_GPL(add_bootloader_randomness); \ No newline at end of file +EXPORT_SYMBOL_GPL(add_bootloader_randomness); which is "the '-' line doesn't have a newline, the '+' line does" marker. > > Doing something like the above to /dev/urandom is likely the right > > thing to do eventually, but I didn't want to mix up "we can perhaps > > improve the urandom situation too" with the basic "let's fix the boot > > problem". The urandom behavior change would be a separate thing. > > So make it a separate patch and let's hammer on it during the next weeks > and see what happens? Yeah, probably. > > Also, talking about "future changes". Right now > > "try_to_generate_entropy()" is actually uninterruptible once it gets > > started. I think we should add a test for signal_pending() too, but it > > Wouldn't that even increase its entropy, which would be a good thing? I'm not sure it increases it, but it certainly shouldn't make it any worse. Linus