WARNING: CPU: 27 PID: 7051 at lib/math/int_log.c:63 intlog2+0xaa/0xe0 at running int_log_kunit test (v6.15-rc1)

From: Erhard Furtner
Date: Tue Apr 08 2025 - 14:02:30 EST


Greetings!

I gave v6.15-rc1 a test ride on my Ryzen 5950 system with some debugging options turned on.

At running int_log_kunit I noticed the following WARNING in dmesg:

[...]
KTAP version 1
1..1
KTAP version 1
# Subtest: math-int_log
# module: int_log_kunit
1..2
KTAP version 1
# Subtest: intlog2_test
------------[ cut here ]------------
WARNING: CPU: 27 PID: 7051 at lib/math/int_log.c:63 intlog2+0xaa/0xe0
Modules linked in: int_log_kunit uinput rfcomm btusb btrtl btmtk btbcm btintel fortify_kunit kunit snd_hrtimer snd_seq snd_seq_device fuse zram cfg80211 af_packet ccm algif_aead crypto_null des3_ede_x86_64 cbc des_generic libdes cmac md5 bnep bluetooth rfkill nls_iso8859_15 nls_cp437 vfat fat dm_crypt nhpoly1305_avx2 nhpoly1305 chacha_generic chacha_x86_64 libchacha adiantum libpoly1305 algif_skcipher pkcs8_key_parser nct6775 hwmon_vid nct6775_core snd_hda_codec_realtek snd_hda_codec_generic uas usb_storage snd_hda_scodec_component snd_hda_codec_hdmi amd_atl radeon amd64_edac snd_hda_intel edac_mce_amd snd_intel_dspcfg snd_hda_codec drm_suballoc_helper snd_hwdep drm_ttm_helper ttm snd_hda_core i2c_algo_bit video snd_pcm kvm_amd backlight drm_exec snd_timer drm_display_helper snd k10temp hwmon soundcore wmi_bmof gpio_amdpt wmi gpio_generic button input_leds joydev led_class evdev hid_generic usbhid hid efivarfs sha512_ssse3 sha256_ssse3 sha1_ssse3 sha1_generic aesni_intel gf128mul crypto_simd cryptd ccp
xhci_pci xhci_hcd usbcore usb_common dm_mod
CPU: 27 UID: 0 PID: 7051 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc1-Zen3 #6 PREEMPT
Tainted: [B]=BAD_PAGE, [N]=TEST
Hardware name: To Be Filled By O.E.M. B550M Pro4/B550M Pro4, BIOS L3.46 08/20/2024
RIP: 0010:intlog2+0xaa/0xe0
Code: 29 c5 41 0f b7 cd 0f af d9 c1 eb 0f c1 e5 18 c1 e0 08 09 e8 01 d8 5b 41 5c 41 5d 41 5e 41 5f 5d 31 c9 31 ff e9 d2 60 1a ff cc <0f> 0b 31 c0 eb e6 44 89 f1 80 e1 07 fe c1 38 c1 7c 9b 4c 89 f7 e8
RSP: 0018:ffffc90000e1fda8 EFLAGS: 00010246
RAX: 1ffffffff82fb400 RBX: ffffc9000c5cf630 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000208040 R08: 0000000000000000 R09: 0000000000000000
R10: ffffc90000e1fe40 R11: ffffffffc09fb000 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffffffc17da1a0 R15: ffffc90000e1fe30
FS: 0000000000000000(0000) GS:ffff888835418000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f83bc35c000 CR3: 000000011287f000 CR4: 0000000000350ef0
Call Trace:
<TASK>
intlog2_test+0x6e/0x170 [int_log_kunit]
? ktime_get_ts64+0x8f/0x1f0
kunit_try_run_case+0x119/0x340 [kunit]
? kunit_cleanup+0x120/0x120 [kunit]
kunit_generic_run_threadfn_adapter+0x73/0x100 [kunit]
kthread+0x46a/0x570
? kunit_try_catch_run+0x620/0x620 [kunit]
? kthread_blkcg+0xb0/0xb0
ret_from_fork+0x3c/0x70
? kthread_blkcg+0xb0/0xb0
ret_from_fork_asm+0x11/0x20
</TASK>
---[ end trace 0000000000000000 ]---
ok 1 Log base 2 of 0
ok 2 Log base 2 of 1
ok 3 Log base 2 of 2
ok 4 Log base 2 of 3
ok 5 Log base 2 of 4
ok 6 Log base 2 of 8
ok 7 Log base 2 of 16
ok 8 Log base 2 of 32
ok 9 Log base 2 of MAX
# intlog2_test: pass:9 fail:0 skip:0 total:9
ok 1 intlog2_test
KTAP version 1
# Subtest: intlog10_test
------------[ cut here ]------------
WARNING: CPU: 1 PID: 7069 at lib/math/int_log.c:120 intlog10+0x1e/0x30
Modules linked in: int_log_kunit uinput rfcomm btusb btrtl btmtk btbcm btintel fortify_kunit kunit snd_hrtimer snd_seq snd_seq_device fuse zram cfg80211 af_packet ccm algif_aead crypto_null des3_ede_x86_64 cbc des_generic libdes cmac md5 bnep bluetooth rfkill nls_iso8859_15 nls_cp437 vfat fat dm_crypt nhpoly1305_avx2 nhpoly1305 chacha_generic chacha_x86_64 libchacha adiantum libpoly1305 algif_skcipher pkcs8_key_parser nct6775 hwmon_vid nct6775_core snd_hda_codec_realtek snd_hda_codec_generic uas usb_storage snd_hda_scodec_component snd_hda_codec_hdmi amd_atl radeon amd64_edac snd_hda_intel edac_mce_amd snd_intel_dspcfg snd_hda_codec drm_suballoc_helper snd_hwdep drm_ttm_helper ttm snd_hda_core i2c_algo_bit video snd_pcm kvm_amd backlight drm_exec snd_timer drm_display_helper snd k10temp hwmon soundcore wmi_bmof gpio_amdpt wmi gpio_generic button input_leds joydev led_class evdev hid_generic usbhid hid efivarfs sha512_ssse3 sha256_ssse3 sha1_ssse3 sha1_generic aesni_intel gf128mul crypto_simd cryptd ccp
xhci_pci xhci_hcd usbcore usb_common dm_mod
CPU: 1 UID: 0 PID: 7069 Comm: kunit_try_catch Tainted: G B W N 6.15.0-rc1-Zen3 #6 PREEMPT
Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
Hardware name: To Be Filled By O.E.M. B550M Pro4/B550M Pro4, BIOS L3.46 08/20/2024
RIP: 0010:intlog10+0x1e/0x30
Code: f7 e8 96 89 92 ff eb 9f 0f 1f 40 00 85 ff 74 1a e8 17 ff ff ff 89 c0 48 69 c0 a1 26 88 26 48 c1 e8 1f 31 ff e9 7e 60 1a ff cc <0f> 0b 31 c0 eb f2 cc cc cc cc cc cc cc cc cc cc cc cc 85 f6 74 2a
RSP: 0018:ffffc90001c67dd8 EFLAGS: 00010246
RAX: 1ffffffff82fb400 RBX: ffffc9000c5cf630 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000208040 R08: 0000000000000000 R09: 0000000000000000
R10: ffffc90001c67e40 R11: ffffffffc09fb1b0 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffffffc17da480 R15: ffffc90001c67e30
FS: 0000000000000000(0000) GS:ffff888834718000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00003c7cb8987000 CR3: 0000000164e07000 CR4: 0000000000350ef0
Call Trace:
<TASK>
intlog10_test+0x6e/0x170 [int_log_kunit]
? ktime_get_ts64+0x8f/0x1f0
kunit_try_run_case+0x119/0x340 [kunit]
? kunit_cleanup+0x120/0x120 [kunit]
kunit_generic_run_threadfn_adapter+0x73/0x100 [kunit]
kthread+0x46a/0x570
? kunit_try_catch_run+0x620/0x620 [kunit]
? kthread_blkcg+0xb0/0xb0
ret_from_fork+0x3c/0x70
? kthread_blkcg+0xb0/0xb0
ret_from_fork_asm+0x11/0x20
</TASK>
---[ end trace 0000000000000000 ]---
ok 1 Log base 10 of 0
ok 2 Log base 10 of 1
ok 3 Log base 10 of 6
ok 4 Log base 10 of 10
ok 5 Log base 10 of 100
ok 6 Log base 10 of 1000
ok 7 Log base 10 of 10000
ok 8 Log base 10 of MAX
# intlog10_test: pass:8 fail:0 skip:0 total:8
ok 2 intlog10_test
# math-int_log: pass:2 fail:0 skip:0 total:2
# Totals: pass:17 fail:0 skip:0 total:17
ok 1 math-int_log


The test itself however seems to pass. Kernel .config attached.

Regards,
Erhard

Attachment: config_615-rc1_zen3+
Description: Binary data