Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2019 09:49:58 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        "Conrad E. Meyer" <cem@freebsd.org>
Cc:        Justin Hibbits <chmeeedalf@gmail.com>, src-committers <src-committers@freebsd.org>,  svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r346250 - in head: share/man/man4 share/man/man9 sys/dev/random sys/kern sys/libkern sys/sys
Message-ID:  <CANCZdfomhxGD=XjZW8BL0_aoiyGS1xgpO7jJfrq=69hFo_MZ%2BQ@mail.gmail.com>
In-Reply-To: <CAG6CVpX0TtO48UZU0y7p_H5oQE35kyUQnJi8EWViTxiYphALeg@mail.gmail.com>
References:  <201904151840.x3FIeaEQ009242@repo.freebsd.org> <CAPyFy2D9NQQKwVx5MhCfasQ82x7C9s6mj5kXuDE1oogrQeoJ5A@mail.gmail.com> <CAHSQbTAfwYcLenBxg4ZB13P03S%2BTYEM1-xy3BYsSWJ49hBWLZA@mail.gmail.com> <CAG6CVpXwOhSpmCT1SShvEOZAdjbQSk5xSzk%2BLk8c5fMpnhSKQw@mail.gmail.com> <20190416092402.4288bc90@titan.knownspace> <CAG6CVpX0TtO48UZU0y7p_H5oQE35kyUQnJi8EWViTxiYphALeg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 16, 2019 at 9:27 AM Conrad Meyer <cem@freebsd.org> wrote:

> On Tue, Apr 16, 2019 at 7:24 AM Justin Hibbits <chmeeedalf@gmail.com>
> wrote:
> >
> > Hi Conrad,
> > ...
> > [Power] does use bsdinstall to install.  How is entropy loaded at
> startup,
> > which causes the problem noted in github?
>
> There are a couple very early load sources.  loader(8) will load
> early-boot entropy from /boot/entropy and pass it to the kernel as a
> fake module (entropy_cache_load in loader.conf(5)), similar to
> cpu_microcode early load.
>
> The fallback option is random(4) itself groping into the filesystem
> during early auto-conf (SI_SUB_RANDOM:SI_ORDER_FOURTH, IIRC) to access
> /boot/entropy directly.
>

SI_SUB_RANDOM is too early. It's at 0x2160000,  while SI_SUB_ROOT_CONF
doesn't happen until 0xb000000.


> > If it's loaded before
> > filesystems get mounted, that could be a problem for us, because /boot
> > is on a different filesystem (msdosfs, to be read by petitboot).
> > Petitboot also does not have a way to preload modules, so all we have
> > at startup, until spawning init, is the kernel.
>
> Yes, that seems potentially problematic.  Can the Power kernel access
> the non-msdosfs root filesystem?  Let's follow-up offline about
> PPC-specific early entropy seeding.  I would much prefer we figure out
> a way to provide early entropy to Power than disabling or crippling
> every early random consumer on the arch.  Do you know what the Linux
> folks do?
>
> On Power with darn, we could probably just spin in SI_ORDER_FOURTH
> until we have enough darn output to seed random.  Similar for x86 CI
> images, I guess; though they do not have the loader problem, some
> people have non-bsdinstall installation methods.
>

They do have the loader problem because many means to generate an image
don't generate /boot/entropy.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfomhxGD=XjZW8BL0_aoiyGS1xgpO7jJfrq=69hFo_MZ%2BQ>