Skip to contentSkip to conversation

5.18.1 has thousands of similar lines in dmesg with CONFIG_WARN_ALL_UNSEEDED_RANDOM=y

DISCUSSION Toralf Förster 3 participants 6 messages May 30, 2022

lore
Share & tools
lore
#0 lore raw

This deletes the early boot messages in dmesg:

/var/log # head dmesg

[    3.114274] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114286] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114291] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114297] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114304] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114315] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114323] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114329] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114333] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114345] random: get_random_u32 called from

allocate_slab+0x144/0x480 with crng_init=0

5.18.0 was fine

--
Toralf

#1 lore raw
Quoted 2 lines · Toralf Förster

This deletes the early boot messages in dmesg:

Well,

changing CONFIG_LOG_BUF_SHIFT=18 to CONFIG_LOG_BUF_SHIFT=20 helps, but nevertheless:

 $ grep get_random_u dmesg-5.18.1 | wc
   5541   38787  440908

For 5.15.44 there's no similar effect in dmesg after upgrading the kernel.

--
Toralf

#2 lore raw
Quoted 5 lines · Toralf Förster
Quoted 1 line · Toralf Förster

This deletes the early boot messages in dmesg:

changing CONFIG_LOG_BUF_SHIFT=18 to CONFIG_LOG_BUF_SHIFT=20 helps, but nevertheless:

FWIW, you can also use the boot argument "log_buf_len" to dynamically allocate the dmesg buffer at boot.

For example: log_buf_len=16M

This is usually more convenient than reconfiguring/rebuilding your kernel.

John Ogness

#3 lore raw
Quoted 2 lines · John Ogness

FWIW, you can also use the boot argument "log_buf_len" to dynamically allocate the dmesg buffer at boot.

indeed.
Thx.

--
Toralf

#4 lore raw
In reply to Toralf Förster

Hi Toralf,

Quoted 22 lines · Toralf Förster

This deletes the early boot messages in dmesg:

/var/log # head dmesg

[    3.114274] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114286] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114291] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114297] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114304] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114315] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114323] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114329] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114333] random: get_random_u32 called from
allocate_slab+0x144/0x480 with crng_init=0
[    3.114345] random: get_random_u32 called from
Quoted 1 line

allocate_slab+0x144/0x480 with crng_init=0

This was simplified here:

    https://lore.kernel.org/lkml/[email protected]/
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc1e127bfa95b5fb2f9307e7168bf8b2b45b4c5e

I'm happy to consider other heuristics than the one there if you find this one problematic. But I think as a debug option, the current behavior encapsulates well what somebody might want to know when debugging a kernel. Either way, please let me know if this poses a problem for you.

Jason