[openwrt/openwrt] urngd: update to the latest master
Rafał Miłecki
zajec5 at gmail.com
Fri Aug 18 13:33:28 PDT 2023
On 26.07.2023 10:45, Rafał Miłecki wrote:
> On 2023-07-25 10:10, Etienne Champetier wrote:
>>> commit c74b5e09e692839b39c8325b5f8dc5f2a3b3896c
>>> Author: Rafał Miłecki <rafal at milecki.pl>
>>> AuthorDate: Tue Jul 25 09:51:35 2023 +0200
>>>
>>> urngd: update to the latest master
>>
>> Is urngd still needed/relevant given the 'recent" improvements in
>> linux random generator ?
>
> Good question. To be honest I hit urng failing to initialize issue while
> resolving multiple years-old BCM53753 regressions over last 2-3 weeks.
>
>
> So before kernel 5.19 I really needed urng for BCM53753. Without urng it
> took over 1,5 hour to initialize crng and start dropbear:
> [ 6095.816238] crng init done
> or:
> [ 6158.675813] crng init done
>
> That was related to the 29e170dbaac0 ("dropbear: bump to 2020.79") as
> dropbear started using getrandom().
>
>
> In kernel 5.19 we've received following random subsystem changes:
> ac2ab99072cc ("Merge tag 'random-5.19-rc1-for-linus' of
> git://git.kernel.org/pub/scm/linux/kernel/git/crng/random"):
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ac2ab99072cce553c78f326ea22d72856f570d88
>
> For BCM53753 the critical change was commit ff8a8f59c99f ("arm: use
> fallback for random_get_entropy() instead of zero"):
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ff8a8f59c99f6a7c656387addc4d9f2247d75077
>
>
> Those random subsystem changes were later backported to stable kernel
> releases (e.g. Linux 5.4.200). So for BCM53573 that may make urng
> obsolete but I'm not sure about all other cases.
I switched back to the latest openwrt-21.02 branch and I hit that random
issue again. I didn't expect it as I use a pretty recent 5.4 stable
kernel (5.4.238) which includes random subsystem changes.
# uname -r
5.4.238
# logread | grep urngd
Mon Jun 19 21:50:01 2023 user.err kernel: [ 6.815077] urngd: jent-rng init failed, err: 2
# uptime
01:24:57 up 3:35, load average: 0.00, 0.00, 0.00
# ps ww | grep dropbear
1291 root 1320 S /bin/sh /etc/rc.common /etc/rc.d/S19dropbear boot
1333 root 912 S /usr/bin/dropbearkey -t ed25519 -f /tmp/tmp.lEDhIj/dropbear_ed25519_host_key
1794 root 1168 S grep dropbear
So I say that urngd it still needed.
More information about the openwrt-devel
mailing list