[BUG] KCSAN: ACPI: data-race in acpi_ut_trace_u32 / acpi_ut_track_stack_ptr

From: Mirsad Todorovac
Date: Thu Aug 17 2023 - 13:31:56 EST


Hi,

On the Ubuntu 22.04 LTS, on an assembled box with Ryzen 7950X, there seem to be ACPI KCSAN
detected bugs in the startup:

(Please find the complete startup dmesg and lshw attached.)

[ 4.052424] ==================================================================
[ 4.052596] BUG: KCSAN: data-race in acpi_ut_trace_u32 / acpi_ut_track_stack_ptr

[ 4.052815] write to 0xffffffff8b939f44 of 4 bytes by task 0 on cpu 13:
[ 4.052966] acpi_ut_trace_u32+0x56/0x140
[ 4.052978] acpi_read_bit_register+0x4b/0x200
[ 4.052989] acpi_idle_bm_check+0x98/0x140
[ 4.052998] acpi_idle_enter_bm+0xe5/0x150
[ 4.053012] acpi_idle_enter+0x13c/0x190
[ 4.053025] cpuidle_enter_state+0x8d/0x520
[ 4.053037] cpuidle_enter+0x41/0x70
[ 4.053048] call_cpuidle+0x23/0x60
[ 4.053060] do_idle+0x1f1/0x250
[ 4.053068] cpu_startup_entry+0x20/0x30
[ 4.053076] start_secondary+0x129/0x160
[ 4.053088] secondary_startup_64_no_verify+0x17e/0x18b

[ 4.053144] read to 0xffffffff8b939f44 of 4 bytes by task 248 on cpu 24:
[ 4.053299] acpi_ut_track_stack_ptr+0x55/0xb0
[ 4.053311] acpi_ps_alloc_op+0x20/0x1a0
[ 4.053322] acpi_ps_create_op+0x2a5/0x640
[ 4.053333] acpi_ps_parse_loop+0x238/0x1030
[ 4.053343] acpi_ps_parse_aml+0x398/0x870
[ 4.053354] acpi_ps_execute_method+0x2e0/0x5f0
[ 4.053366] acpi_ns_evaluate+0x522/0x960
[ 4.053378] acpi_evaluate_object+0x21a/0x650
[ 4.053388] acpi_device_sleep_wake+0xc5/0x170
[ 4.053401] acpi_enable_wakeup_device_power+0xb2/0x190
[ 4.053414] __acpi_device_wakeup_enable+0x57/0x210
[ 4.053424] acpi_pm_set_device_wakeup+0x7a/0x1d0
[ 4.053435] acpi_pci_wakeup+0xf5/0x140
[ 4.053448] __pci_enable_wake+0xc5/0x160
[ 4.053458] pci_finish_runtime_suspend+0x50/0xb0
[ 4.053472] pci_pm_runtime_suspend+0x13d/0x2d0
[ 4.053483] __rpm_callback+0x6f/0x190
[ 4.053493] rpm_callback+0xe4/0x100
[ 4.053502] rpm_suspend+0x278/0xb80
[ 4.053511] pm_runtime_work+0xea/0xf0
[ 4.053521] process_one_work+0x525/0x930
[ 4.053533] worker_thread+0x311/0x7e0
[ 4.053544] kthread+0x18b/0x1d0
[ 4.053552] ret_from_fork+0x43/0x70
[ 4.053563] ret_from_fork_asm+0x1b/0x30

[ 4.053614] value changed: 0x00000006 -> 0x00000008

[ 4.053772] Reported by Kernel Concurrency Sanitizer on:
[ 4.053895] CPU: 24 PID: 248 Comm: kworker/24:2 Not tainted 6.5.0-rc6-net-cfg-kcsan-00038-g16931859a650 #35
[ 4.053906] Hardware name: ASRock X670E PG Lightning/X670E PG Lightning, BIOS 1.21 04/26/2023
[ 4.053913] Workqueue: pm pm_runtime_work
[ 4.053925] ==================================================================
[ 4.054480] ACPI: \_SB_.PLTF.C01C: Found 3 idle states
[ 4.057126] ==================================================================
[ 4.057298] BUG: KCSAN: data-race in acpi_ut_trace / acpi_ut_trace

[ 4.057496] write to 0xffffffff8b939f44 of 4 bytes by task 1 on cpu 15:
[ 4.057648] acpi_ut_trace+0x52/0x140
[ 4.057659] acpi_ut_copy_iobject_to_eobject+0x4d/0x200
[ 4.057671] acpi_evaluate_object+0x638/0x650
[ 4.057681] acpi_processor_evaluate_cst+0x6f/0x680
[ 4.057693] acpi_processor_get_cstate_info+0xa3/0x920
[ 4.057707] acpi_processor_power_init+0x2fa/0x350
[ 4.057716] __acpi_processor_start+0x129/0x140
[ 4.057729] acpi_processor_start+0x41/0x60
[ 4.057741] really_probe+0x2b1/0x620
[ 4.057752] __driver_probe_device+0xe7/0x230
[ 4.057762] driver_probe_device+0x64/0x170
[ 4.057773] __driver_attach+0x170/0x2f0
[ 4.057783] bus_for_each_dev+0x92/0xf0
[ 4.057796] driver_attach+0x2d/0x40
[ 4.057805] bus_add_driver+0x1b2/0x310
[ 4.057814] driver_register+0xa9/0x200
[ 4.057825] acpi_processor_driver_init+0x5e/0x120
[ 4.057838] do_one_initcall+0x48/0x3c0
[ 4.057850] kernel_init_freeable+0x5e3/0x840
[ 4.057862] kernel_init+0x21/0x260
[ 4.057870] ret_from_fork+0x43/0x70
[ 4.057880] ret_from_fork_asm+0x1b/0x30

[ 4.057931] read to 0xffffffff8b939f44 of 4 bytes by task 253 on cpu 24:
[ 4.058084] acpi_ut_trace+0x3d/0x140
[ 4.058095] acpi_ps_parse_aml+0x52/0x870
[ 4.058106] acpi_ps_execute_method+0x2e0/0x5f0
[ 4.058118] acpi_ns_evaluate+0x522/0x960
[ 4.058130] acpi_evaluate_object+0x21a/0x650
[ 4.058140] acpi_device_sleep_wake+0xc5/0x170
[ 4.058152] acpi_enable_wakeup_device_power+0xb2/0x190
[ 4.058165] __acpi_device_wakeup_enable+0x57/0x210
[ 4.058175] acpi_pm_set_device_wakeup+0x7a/0x1d0
[ 4.058186] acpi_pci_wakeup+0xf5/0x140
[ 4.058198] __pci_enable_wake+0xc5/0x160
[ 4.058208] pci_finish_runtime_suspend+0x50/0xb0
[ 4.058221] pci_pm_runtime_suspend+0x13d/0x2d0
[ 4.058232] __rpm_callback+0x6f/0x190
[ 4.058241] rpm_callback+0xe4/0x100
[ 4.058250] rpm_suspend+0x278/0xb80
[ 4.058259] pm_runtime_work+0xea/0xf0
[ 4.058268] process_one_work+0x525/0x930
[ 4.058280] worker_thread+0x311/0x7e0
[ 4.058291] kthread+0x18b/0x1d0
[ 4.058299] ret_from_fork+0x43/0x70
[ 4.058309] ret_from_fork_asm+0x1b/0x30

[ 4.058364] value changed: 0x00000005 -> 0x00000006

[ 4.058521] Reported by Kernel Concurrency Sanitizer on:
[ 4.058644] CPU: 24 PID: 253 Comm: kworker/24:6 Not tainted 6.5.0-rc6-net-cfg-kcsan-00038-g16931859a650 #35
[ 4.058655] Hardware name: ASRock X670E PG Lightning/X670E PG Lightning, BIOS 1.21 04/26/2023
[ 4.058662] Workqueue: pm pm_runtime_work
[ 4.058673] ==================================================================
[ 4.059604] ACPI: \_SB_.PLTF.C01E: Found 3 idle states
[ 4.061276] ==================================================================

Best regards,
Mirsad Todorovac

Attachment: dmesg-2.log.xz
Description: application/xz

Attachment: lshw.txt.xz
Description: application/xz