Hi Linus, Ard, On Fri, Jun 23, 2023 at 7:30 PM Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: > Maybe it would make more sense to write a new seed at kernel shutdown. > Not only do y ou presumably have a ton more entropy at that point, but > if things go sideways it's also less of a problem to have dead > machine. We always have to write when using so that we don't credit the same seed twice, so it's gotta be used at a stage when SetVariable is somewhat working. > On Fri, 23 Jun 2023 at 06:55, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote: > > > > Setting the variable from user space is ultimately a better choice, I > > think. > > Doing it from the kernel might still be an option, but I think it was > a huge mistake to do it *early*. > > Early boot is fragile to begin with when not everything is set up, and > *much* harder to debug. > > So not only are problems more likely to happen in the first place, > when they do happen they are a lot harder to figure out. I think it's still worth doing in the kernel - or trying to do, at least. I wonder why SetVariable is failing on this system, and whether there's a way to workaround it. If we wind up needing to quirk around it somewhat, then I suspect your suggestion of not doing this as early in boot might be wise. Specifically, what if we do this after workqueues are available and do it from one of them? That's still early enough in boot that it makes the feature useful, but the scheduler is alive at that point. Then in the worst case, we just get a wq stall splat, which the user is able to report, and then can figure out what to do from there. Jason