lkml.org 
[lkml]   [2019]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] random: Move rand_initialize() earlier
On Fri, Oct 12, 2018 at 9:45 AM Kees Cook <keescook@chromium.org> wrote:
>
> On Fri, Oct 12, 2018 at 7:29 AM, Theodore Y. Ts'o <tytso@mit.edu> wrote:
> > On Thu, Oct 11, 2018 at 03:54:21PM -0700, Kees Cook wrote:
> >> Right now rand_initialize() is run as an early_initcall(), but it only
> >> depends on timekeeping_init() (for mixing ktime_get_real() into the
> >> pools). However, the call to boot_init_stack_canary() for stack canary
> >> initialization runs earlier, which triggers a warning at boot:
> >>
> >> random: get_random_bytes called from start_kernel+0x357/0x548 with crng_init=0
> >>
> >> Instead, this moves rand_initialize() to after timekeeping_init(), and moves
> >> canary initialization here as well.
> >>
> >> Note that this warning may still remain for machines that do not have
> >> UEFI RNG support (which initializes the RNG pools durting setup_arch()),
> >> or for x86 machines without RDRAND (or booting without "random.trust=on"
> >> or CONFIG_RANDOM_TRUST_CPU=y).
> >>
> >> Signed-off-by: Kees Cook <keescook@chromium.org>
> >
> > This seems reasonable to me. Were you hoping to get this in for -rc8?
> > It looks sane, and I don't see any _obvious_ unintended consequences
> > of such a change, but it's rather late in the development cycle, and
> > it isn't regression fix.
>
> Yeah, for sure. I didn't mean this for 4.19. I assumed -next, and
> likely further changes based on discussion, etc etc.

Hi Ted! Did this get lost? This has come up again, and I don't see it
having landed anywhere yet. Can you take this?

--
Kees Cook

\
 
 \ /
  Last update: 2019-04-16 05:47    [W:0.047 / U:5.848 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site