[OE-core] [PATCH 2/2] libjitterentropy: add 2.1.2
Hongxu Jia
hongxu.jia at windriver.com
Fri Nov 9 14:18:21 UTC 2018
On 2018/11/9 下午6:30, richard.purdie at linuxfoundation.org wrote:
> On Fri, 2018-11-09 at 17:12 +0800, Hongxu Jia wrote:
>> From the following kernel commit we know: Fedora has integrated the
>> jitter
>> entropy daemon to work around slow boot problems, especially on VM's
>> that
>> don't support virtio-rng
>>
>>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=81e69df38e2911b642ec121dec319fad2a4782f3
>> Do the same thing for Yocto.
>>
>> Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
> I'm not convinced this is going to help. The userspace support comes up
> quite late and the kernel blocking has already happened before that
> point when I last saw these issues. This was why I just enabled the
> virtio rng passthrough everywhere...
Yes, if VM support virtio-rng, we indeed do not need it, but for VM not
support virtio-rng, it makes sense.
> Is libjitterentropy actually helping your use cases?
Yes, it helps, I use runqemu without virtio-rng on qemumips64 to
simulate VM that don't support virtio-rng
With libjitterentropy and rng-tools, it takes <60s to init crng (after
rngd-tools started successfully)
[ 48.967114] random: crng init done
Fri Nov 9 14:06:49 2018: Starting random number generator daemon
Fri Nov 9 14:06:50 2018: Initalizing available sources
Fri Nov 9 14:06:50 2018:
Fri Nov 9 14:06:50 2018: Failed to init entropy source hwrng
Fri Nov 9 14:06:50 2018:
Fri Nov 9 14:07:05 2018: Enabling JITTER rng support
Fri Nov 9 14:07:06 2018:
Fri Nov 9 14:07:06 2018: Initalizing entropy source jitter
Fri Nov 9 14:07:06 2018:
Fri Nov 9 14:07:06 2018: .
Fri Nov 9 14:07:06 2018: Starting OpenBSD Secure Shell server: sshd
Fri Nov 9 14:07:06 2018: done.
Fri Nov 9 14:07:07 2018: hwclock: can't open '/dev/misc/rtc': No such
file or directory
Fri Nov 9 14:07:07 2018: Starting syslogd/klogd: done
Nov 9 14:07:07 qemumips64 user.notice kernel: [ 48.967114] random:
crng init done
Without libjitterentropy and rng-tools, it takes >2minutes to init crng
(there are some other
virtual device to generate noise for entropy)
[ 124.728869] random: crng init done
By the way, without virtio-rng, /dev/hwrng is dead on guest, that's the
reason why I upgrade
rng-tools and integrate libjitterentropy, previously old rng-tools hung
minutes in this situation.
//Hongxu
> Cheers,
>
> Richard
>
More information about the Openembedded-core
mailing list