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

2 views
Skip to first unread message

Erhard Furtner

unread,
Apr 8, 2025, 2:02:19 PM4/8/25
to kuni...@googlegroups.com, linux-...@vger.kernel.org
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
config_615-rc1_zen3+

Erhard Furtner

unread,
Apr 21, 2025, 6:22:47 AM4/21/25
to kuni...@googlegroups.com, linux-...@vger.kernel.org, linux-h...@vger.kernel.org
Greetings!

Still getting this warning in v6.15-rc3 at running running int_log_kunit test, also with a 'GCC14 -O2'-built kernel:

------------[ cut here ]------------
WARNING: CPU: 1 PID: 4436 at lib/math/int_log.c:63 intlog2+0xd3/0x110
Modules linked in: int_log_kunit fortify_kunit kunit snd_hrtimer snd_seq snd_seq_device fuse zram af_packet cfg80211 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 snd_hda_codec_realtek sg snd_hda_codec_generic snd_hda_scodec_component pkcs8_key_parser snd_hda_codec_hdmi amd_atl amd64_edac nct6775 edac_mce_amd snd_hda_intel nct6775_core hwmon_vid radeon snd_intel_dspcfg snd_hda_codec video joydev uas usb_storage snd_hwdep backlight input_leds snd_hda_core drm_suballoc_helper led_class i2c_algo_bit snd_pcm kvm_amd drm_ttm_helper snd_timer ttm snd drm_exec soundcore drm_display_helper k10temp hwmon wmi_bmof wmi gpio_amdpt evdev gpio_generic button 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: 4436 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc3-Zen3 #11 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+0xd3/0x110
Code: c1 e0 18 48 83 c4 08 89 d1 c1 e2 08 29 cb 01 d0 0f b7 db 0f af dd c1 eb 0f 01 d8 5b 5d 41 5c 31 d2 31 c9 31 ff e9 98 88 d7 fe <0f> 0b 31 c0 31 d2 31 c9 31 ff e9 89 88 d7 fe 89 44 24 04 e8 65 27
RSP: 0018:ffffc90000aafd38 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffc9000531f548 RCX: 0000000000000000
RDX: 1ffffffff8353124 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 1ffff92000155fa9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffc1a98920
R13: 0000000000000000 R14: ffff888112a96400 R15: ffffc90000aafe18
FS: 0000000000000000(0000) GS:ffff888820ed7000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fbd26f0f000 CR3: 000000017a363000 CR4: 0000000000350ef0
Call Trace:
<TASK>
intlog2_test+0xcb/0x200 [int_log_kunit]
? intlog10_test+0x200/0x200 [int_log_kunit]
? srso_alias_return_thunk+0x5/0xfbef5
? srso_alias_return_thunk+0x5/0xfbef5
? ktime_get_ts64+0x7a/0x220
kunit_try_run_case+0x199/0x2b0 [kunit]
? srso_alias_return_thunk+0x5/0xfbef5
? kunit_try_run_case_cleanup+0xe0/0xe0 [kunit]
? srso_alias_return_thunk+0x5/0xfbef5
? do_raw_spin_unlock+0x4f/0x220
? kunit_try_run_case_cleanup+0xe0/0xe0 [kunit]
? kunit_mem_assert_format+0x460/0x460 [kunit]
kunit_generic_run_threadfn_adapter+0x7b/0xe0 [kunit]
kthread+0x349/0x6c0
? kthread_is_per_cpu+0xd0/0xd0
? kthread_is_per_cpu+0xd0/0xd0
? kthread_is_per_cpu+0xd0/0xd0
ret_from_fork+0x2b/0x70
? kthread_is_per_cpu+0xd0/0xd0
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: 23 PID: 4454 at lib/math/int_log.c:120 intlog10+0xe2/0x110
Modules linked in: int_log_kunit fortify_kunit kunit snd_hrtimer snd_seq snd_seq_device fuse zram af_packet cfg80211 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 snd_hda_codec_realtek sg snd_hda_codec_generic snd_hda_scodec_component pkcs8_key_parser snd_hda_codec_hdmi amd_atl amd64_edac nct6775 edac_mce_amd snd_hda_intel nct6775_core hwmon_vid radeon snd_intel_dspcfg snd_hda_codec video joydev uas usb_storage snd_hwdep backlight input_leds snd_hda_core drm_suballoc_helper led_class i2c_algo_bit snd_pcm kvm_amd drm_ttm_helper snd_timer ttm snd drm_exec soundcore drm_display_helper k10temp hwmon wmi_bmof wmi gpio_amdpt evdev gpio_generic button 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: 23 UID: 0 PID: 4454 Comm: kunit_try_catch Tainted: G B W N 6.15.0-rc3-Zen3 #11 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+0xe2/0x110
Code: db 41 01 c4 0f af dd c1 eb 0f 42 8d 04 23 5b 5d 48 69 c0 a1 26 88 26 41 5c 41 5d 48 c1 e8 1f 31 d2 31 c9 31 ff e9 79 87 d7 fe <0f> 0b 31 c0 31 d2 31 c9 31 ff e9 6a 87 d7 fe e8 4a 26 73 ff e9 73
RSP: 0018:ffffc90001da7d38 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffc9000531f548 RCX: 0000000000000000
RDX: 1ffffffff83530d0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 1ffff920003b4fa9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffffc1a98680
R13: 0000000000000000 R14: ffff888112a96400 R15: ffffc90001da7e18
FS: 0000000000000000(0000) GS:ffff8888219d7000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0454cf4590 CR3: 0000000152504000 CR4: 0000000000350ef0
Call Trace:
<TASK>
intlog10_test+0xcb/0x200 [int_log_kunit]
? _sub_I_65535_1+0x310/0x310 [led_class]
? srso_alias_return_thunk+0x5/0xfbef5
? srso_alias_return_thunk+0x5/0xfbef5
? ktime_get_ts64+0x7a/0x220
kunit_try_run_case+0x199/0x2b0 [kunit]
? srso_alias_return_thunk+0x5/0xfbef5
? kunit_try_run_case_cleanup+0xe0/0xe0 [kunit]
? srso_alias_return_thunk+0x5/0xfbef5
? do_raw_spin_unlock+0x4f/0x220
? kunit_try_run_case_cleanup+0xe0/0xe0 [kunit]
? kunit_mem_assert_format+0x460/0x460 [kunit]
kunit_generic_run_threadfn_adapter+0x7b/0xe0 [kunit]
kthread+0x349/0x6c0
? kthread_is_per_cpu+0xd0/0xd0
? kthread_is_per_cpu+0xd0/0xd0
? kthread_is_per_cpu+0xd0/0xd0
ret_from_fork+0x2b/0x70
? kthread_is_per_cpu+0xd0/0xd0
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


Regards,
Erhard

Erhard Furtner

unread,
Jan 6, 2026, 5:17:39 PM (12 days ago) Jan 6
to linux-...@vger.kernel.org, kuni...@googlegroups.com, ke...@kernel.org
Greetings!

Still getting this warning on kernel v6.18.3 and v6.19-rc4 when running
int_log_kunit test via modprobe on my systems (x86_64, x86, ppc). This
dmesg is from my Intel Core Ultra 7 265F system:

[...]
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 ]------------
1
WARNING: lib/math/int_log.c:63 at intlog2+0x59/0x70, CPU#16:
kunit_try_catch/2036
Modules linked in: int_log_kunit kunit snd_hrtimer snd_seq
snd_seq_device af_packet dm_crypt libmd5 nhpoly1305_avx2 nhpoly1305
chacha libchacha adiantum libpoly1305 algif_skcipher nls_iso8859_1
nls_cp437 vfat fat intel_rapl_msr intel_rapl_common intel_pmc_core
x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_generic amdgpu
kvm_intel rapl intel_cstate snd_hda_codec_atihdmi snd_hda_codec_hdmi
i2c_algo_bit drm_ttm_helper snd_hda_intel ttm snd_intel_dspcfg
drm_suballoc_helper pmt_telemetry mfd_core snd_hda_codec pmt_discovery
drm_panel_backlight_quirks pmt_class amdxcp snd_hwdep gpu_sched
snd_hda_core drm_exec drm_buddy snd_pcm drm_display_helper snd_timer
intel_uncore cec snd video soundcore intel_pmc_ssram_telemetry intel_vpu
thermal intel_vsec cfg80211 rfkill wmi backlight fan evdev input_leds
joydev led_class button zram loop fuse dm_mod configfs hid_generic
usbhid hid aesni_intel gf128mul xhci_pci xhci_hcd usbcore usb_common
pinctrl_meteorlake pinctrl_intel pkcs8_key_parser nct6775 nct6775_core
hwmon_vid coretemp hwmon sg dmi_sysfs
CPU: 16 UID: 0 PID: 2036 Comm: kunit_try_catch Tainted: G
N 6.19.0-rc4-ArwL #1 PREEMPTLAZY
Tainted: [N]=TEST
Hardware name: ASUS System Product Name/PRIME B860M-A, BIOS 1802 09/22/2025
RIP: 0010:intlog2+0x59/0x70
Code: c0 0f b7 8c 09 40 06 e9 95 0f b7 84 00 40 06 e9 95 29 c8 c1 e1 08
0f b7 c0 01 ca 0f af c7 c1 e8 0f 01 d0 31 d2 31 c9 31 ff c3 <0f> 0b 31
c0 31 d2 31 c9 31 ff c3 90 66 66 2e 0f 1f 84 00 00 00 00
RSP: 0018:ffffa433e7b4be30 EFLAGS: 00010246
RAX: ffffffffc0b8b2a0 RBX: ffffa433e80d3a58 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff9737dd815500
R13: ffff97380fee3800 R14: ffffffffc0e4fef0 R15: ffffa433e80d3a98
FS: 0000000000000000(0000) GS:ffff97435960f000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc81bb98098 CR3: 00000005d841a002 CR4: 0000000000f72ef0
PKRU: 55555554
Call Trace:
<TASK>
intlog2_test+0x1b/0xa0 [int_log_kunit]
? ktime_get_ts64+0x3d/0x120
kunit_try_run_case+0x7b/0x100 [kunit]
? kunit_mem_assert_format+0x120/0x120 [kunit]
kunit_generic_run_threadfn_adapter+0x16/0x30 [kunit]
kthread+0xdc/0x200
? kthreads_online_cpu+0xf0/0xf0
? kthreads_online_cpu+0xf0/0xf0
ret_from_fork+0x164/0x1c0
? kthreads_online_cpu+0xf0/0xf0
? kthreads_online_cpu+0xf0/0xf0
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 ]------------
1
WARNING: lib/math/int_log.c:120 at intlog10+0x6a/0x80, CPU#15:
kunit_try_catch/2055
Modules linked in: int_log_kunit kunit snd_hrtimer snd_seq
snd_seq_device af_packet dm_crypt libmd5 nhpoly1305_avx2 nhpoly1305
chacha libchacha adiantum libpoly1305 algif_skcipher nls_iso8859_1
nls_cp437 vfat fat intel_rapl_msr intel_rapl_common intel_pmc_core
x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_generic amdgpu
kvm_intel rapl intel_cstate snd_hda_codec_atihdmi snd_hda_codec_hdmi
i2c_algo_bit drm_ttm_helper snd_hda_intel ttm snd_intel_dspcfg
drm_suballoc_helper pmt_telemetry mfd_core snd_hda_codec pmt_discovery
drm_panel_backlight_quirks pmt_class amdxcp snd_hwdep gpu_sched
snd_hda_core drm_exec drm_buddy snd_pcm drm_display_helper snd_timer
intel_uncore cec snd video soundcore intel_pmc_ssram_telemetry intel_vpu
thermal intel_vsec cfg80211 rfkill wmi backlight fan evdev input_leds
joydev led_class button zram loop fuse dm_mod configfs hid_generic
usbhid hid aesni_intel gf128mul xhci_pci xhci_hcd usbcore usb_common
pinctrl_meteorlake pinctrl_intel pkcs8_key_parser nct6775 nct6775_core
hwmon_vid coretemp hwmon sg dmi_sysfs
CPU: 15 UID: 0 PID: 2055 Comm: kunit_try_catch Tainted: G W
N 6.19.0-rc4-ArwL #1 PREEMPTLAZY
Tainted: [W]=WARN, [N]=TEST
Hardware name: ASUS System Product Name/PRIME B860M-A, BIOS 1802 09/22/2025
RIP: 0010:intlog10+0x6a/0x80
Code: 06 e9 95 29 cf c1 e1 08 0f b7 ff 01 ca 0f af f8 c1 ef 0f 8d 04 17
48 69 c0 a1 26 88 26 48 c1 e8 1f 31 d2 31 c9 31 f6 31 ff c3 <0f> 0b 31
c0 31 d2 31 c9 31 f6 31 ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 0018:ffffa433e7b8be30 EFLAGS: 00010246
RAX: ffffffffc0b8b220 RBX: ffffa433e80d3a58 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff9737dd815548
R13: ffff9737ce61f300 R14: ffffffffc0e4fef0 R15: ffffa433e80d3a98
FS: 0000000000000000(0000) GS:ffff97435958f000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555f38881db0 CR3: 00000005d841a005 CR4: 0000000000f72ef0
PKRU: 55555554
Call Trace:
<TASK>
intlog10_test+0x1b/0xa0 [int_log_kunit]
? ktime_get_ts64+0x3d/0x120
kunit_try_run_case+0x7b/0x100 [kunit]
? kunit_mem_assert_format+0x120/0x120 [kunit]
kunit_generic_run_threadfn_adapter+0x16/0x30 [kunit]
kthread+0xdc/0x200
? kthreads_online_cpu+0xf0/0xf0
? kthreads_online_cpu+0xf0/0xf0
ret_from_fork+0x164/0x1c0
? kthreads_online_cpu+0xf0/0xf0
? kthreads_online_cpu+0xf0/0xf0
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
[...]


Pasted my full kernel .config at: https://pastebin.com/qvy98wKa

Regards,
Erhard

Kees Cook

unread,
Jan 7, 2026, 3:35:14 PM (11 days ago) Jan 7
to Erhard Furtner, linux-...@vger.kernel.org, kuni...@googlegroups.com, Alessandro Carminati, Peter Zijlstra
On Tue, Jan 06, 2026 at 11:17:33PM +0100, Erhard Furtner wrote:
> Greetings!
>
> Still getting this warning on kernel v6.18.3 and v6.19-rc4 when running
> int_log_kunit test via modprobe on my systems (x86_64, x86, ppc). This dmesg
> is from my Intel Core Ultra 7 265F system:
>
> [...]
> 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 ]------------
> 1
> WARNING: lib/math/int_log.c:63 at intlog2+0x59/0x70, CPU#16:

This is:

if (unlikely(value == 0)) {
WARN_ON(1);
return 0;
}


> [...]
> ? kthreads_online_cpu+0xf0/0xf0
> ? kthreads_online_cpu+0xf0/0xf0
> ret_from_fork_asm+0x11/0x20
> </TASK>
> ---[ end trace 0000000000000000 ]---
> ok 1 Log base 2 of 0

Whcih seems to be exactly what is being tested...

It seems like we have another case of needed to silence warnings under
kunit[1]. Alessandro and Peter, where does the linked series stand
currently?

-Kees

[1] https://lore.kernel.org/lkml/20250526132755.1...@redhat.com/

--
Kees Cook

Peter Zijlstra

unread,
Jan 7, 2026, 4:47:05 PM (11 days ago) Jan 7
to Kees Cook, Erhard Furtner, linux-...@vger.kernel.org, kuni...@googlegroups.com, Alessandro Carminati
On Wed, Jan 07, 2026 at 12:35:10PM -0800, Kees Cook wrote:

> It seems like we have another case of needed to silence warnings under
> kunit[1]. Alessandro and Peter, where does the linked series stand
> currently?

Well, x86 and s390 now have BUG_FORMAT support and can do all of
WARN*() in __report_bug().

I'm thinking 'someone' wants to get ARM64 and Power implemented too to
cover all the 'big' architectures.

This in turn would enable those suppress-a-warn hacks to live in a
single place and not mess up code-gen.


Reply all
Reply to author
Forward
0 new messages