public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Prarit Bhargava <prarit@redhat.com>
Cc: <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	<x86@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Kees Cook <keescook@chromium.org>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Kate Stewart <kstewart@linuxfoundation.org>
Subject: Re: [PATCH v2] x86, random: Fix get_random_bytes() warning in x86 start_kernel
Date: Mon, 4 Feb 2019 10:55:35 -0500	[thread overview]
Message-ID: <20190204155535.GC9802@mit.edu> (raw)
In-Reply-To: <4adb711f-f81e-31ef-c581-4d5ecc739bd1@redhat.com>

On Sun, Feb 03, 2019 at 08:09:37AM -0500, Prarit Bhargava wrote:
> Ted, the bug I'm trying to fix is the warning:
> 
> random: get_random_bytes called from start_kernel+0x8e/0x587 with crng_init=0
> 
> during early boot.  Even with the kernel parameter the warning appears.

Sometimes the warnings are real, and shouldn't be suppressed.  A
Debian maintainer once tried to suppress a compile-time warning, and
it was disastrous for security.  :-)

What line number is that corresponding to?  It sounds like something
is trying to use get_random_bytes() before the random driver was
initialized, and so the first question is does it really need to call
get_random_bytes() then or can it be moved?

> > Also, relying on the TSC for entropy is not something we should be
> > recommending.
> 
> The current code uses the TSC.  It is not something new I'm introducing.

But we don't *rely* on it.  That's a big difference.

       	     	       	    	     - Ted

  reply	other threads:[~2019-02-04 15:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01 18:08 [PATCH v2] x86, random: Fix get_random_bytes() warning in x86 start_kernel Prarit Bhargava
2019-02-02  3:02 ` Theodore Y. Ts'o
2019-02-03 13:09   ` Prarit Bhargava
2019-02-04 15:55     ` Theodore Y. Ts'o [this message]
2019-02-08 13:14       ` Prarit Bhargava
2019-02-08 17:43         ` Theodore Y. Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190204155535.GC9802@mit.edu \
    --to=tytso@mit.edu \
    --cc=Jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=keescook@chromium.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pombredanne@nexb.com \
    --cc=prarit@redhat.com \
    --cc=riel@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox