[External Mail]Re: [RFC] um: reproducible randomness for time-travel tests

Benjamin Berg benjamin at sipsolutions.net
Thu Nov 19 05:29:35 PST 2026


Hi,

On Thu, 2026-11-19 at 14:16 +0100, Johannes Berg wrote:
> [SNIP]
> > We compared two runs in the same image and got byte-identical HCI and
> > over-the-air captures for the BlueZ cases. That's the scope of our
> > reproducibility check.
> 
> Ah OK. We actually did (at some point in the past at least) validate
> that /dev/urandom returns the same stream :) But I guess BT would also
> have keys derived etc. that depends on that anyway.

We are still collecting that data for every run and I am somewhat
monitoring how reproducible repeated runs are.

Our setup is quite a lot more complicated (hostfs, multiple machines,
etc.) and unfortunately, we are not fully there and still see some
failures.

If I recall correctly though, it was mostly an issue that happens when
running on different hosts at this point. But I have not found out what
the difference is, as I seemed to be able to rule out CPU, host kernel
and some other factors.

Btw. we do also set some environment variables for ld.so to avoid
loading different optimizations depending on the exact host CPU
instruction set.

Benjamin

> 
> > The awkward part is that we have to build a separate 32-bit shared
> > library and rely on UML calling the interposable libc symbol. The shim
> > fixes the bytes UML gets from the host through that call. The guest
> > RNG still mixes in other inputs, including the kernel build
> > information, command line, and interrupt timing you mentioned.
> 
> Right.
> 
> > Would it make sense to start with the os_getrandom() seed from your
> > list, enabled only when a seed is explicitly supplied for a
> > time-travel boot? If your patch is available, I'd be happy to try it
> > against our BlueZ tests.
> 
> I'll just send all of our related patches, there's no real secret here,
> we just didn't think anyone would care, and didn't bother polishing the
> changes enough to be upstreamable :)
> 
> johannes



More information about the linux-um mailing list