Re: [PATCH] ACPICA: fix build with GCC 15 due to -Werror=unterminated-string-initialization

kernel test robot
2025-03-04T04:41:40Z

Hello,

kernel test robot noticed "WARNING:at_mm/early_ioremap.c:#__early_ioremap" on:

commit: 6ebd152438416123dba1a540e884d998108e57f6 ("[PATCH] ACPICA: fix build with GCC 15 due to -Werror=unterminated-string-initialization")
url: https://github.com/intel-lab-lkp/linux/commits/mpagano-gentoo-org/ACPICA-fix-build-with-GCC-15-due-to-Werror-unterminated-string-initialization/20250301-051004
base: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/all/20250228210834.811164-1-mpagano@gentoo.org/
patch subject: [PATCH] ACPICA: fix build with GCC 15 due to -Werror=unterminated-string-initialization

in testcase: boot

config: x86_64-randconfig-007-20250302
compiler: clang-19
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(please refer to attached dmesg/kmsg for entire log/backtrace)

+------------------------------------------------------------------------------+------------+------------+
| | b25eff369f | 6ebd152438 |
+------------------------------------------------------------------------------+------------+------------+
| WARNING:at_mm/early_ioremap.c:#__early_ioremap | 0 | 18 |
| RIP:__early_ioremap | 0 | 18 |
+------------------------------------------------------------------------------+------------+------------+

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202503041028.8f769fd1-lkp@intel.com

[ 0.031199][ T0] ------------[ cut here ]------------
[ 0.031907][ T0] WARNING: CPU: 0 PID: 0 at mm/early_ioremap.c:139 __early_ioremap (mm/early_ioremap.c:139 (discriminator 10))
[ 0.032833][ T0] Modules linked in:
[ 0.033233][ T0] CPU: 0 UID: 0 PID: 0 Comm: swapper Tainted: G T 6.14.0-rc4-00065-g6ebd15243841 #1 5829eae6911cd154dba5b021a54ee27d9237deca
[ 0.034695][ T0] Tainted: [T]=RANDSTRUCT
[ 0.035135][ T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 0.036029][ T0] RIP: 0010:__early_ioremap (mm/early_ioremap.c:139 (discriminator 10))
[ 0.036425][ T0] Code: c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 d3 44 5e fb 0f 0b e9 a1 fd ff ff e8 c7 44 5e fb 0f 0b e9 47 ff ff ff e8 bb 44 5e fb <0f> 0b e9 3b ff ff ff 4c 89 6d b0 4c 8b 6d c0 4d 89 ec 49 f7 dc e8
All code
========
0: c4 (bad)
1: 38 5b 41 cmp %bl,0x41(%rbx)
4: 5c pop %rsp
5: 41 5d pop %r13
7: 41 5e pop %r14
9: 41 5f pop %r15
b: 5d pop %rbp
c: c3 ret
d: e8 d3 44 5e fb call 0xfffffffffb5e44e5
12: 0f 0b ud2
14: e9 a1 fd ff ff jmp 0xfffffffffffffdba
19: e8 c7 44 5e fb call 0xfffffffffb5e44e5
1e: 0f 0b ud2
20: e9 47 ff ff ff jmp 0xffffffffffffff6c
25: e8 bb 44 5e fb call 0xfffffffffb5e44e5
2a:* 0f 0b ud2 <-- trapping instruction
2c: e9 3b ff ff ff jmp 0xffffffffffffff6c
31: 4c 89 6d b0 mov %r13,-0x50(%rbp)
35: 4c 8b 6d c0 mov -0x40(%rbp),%r13
39: 4d 89 ec mov %r13,%r12
3c: 49 f7 dc neg %r12
3f: e8 .byte 0xe8

Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: e9 3b ff ff ff jmp 0xffffffffffffff42
7: 4c 89 6d b0 mov %r13,-0x50(%rbp)
b: 4c 8b 6d c0 mov -0x40(%rbp),%r13
f: 4d 89 ec mov %r13,%r12
12: 49 f7 dc neg %r12
15: e8 .byte 0xe8
[ 0.037790][ T0] RSP: 0000:ffffffff85207cc8 EFLAGS: 00010093 ORIG_RAX: 0000000000000000
[ 0.038377][ T0] RAX: ffffffff860d9bc5 RBX: 0000000000000000 RCX: ffffffff8523e000
[ 0.038929][ T0] RDX: 0000000000000000 RSI: 0000000000001001 RDI: 0000000000000040
[ 0.039482][ T0] RBP: ffffffff85207d28 R08: ffffffff85305b03 R09: 1ffffffff0a60b60
[ 0.040047][ T0] R10: dffffc0000000000 R11: fffffbfff0a60b61 R12: 00000000000005ff
[ 0.040602][ T0] R13: 0000000000001001 R14: 0000000000000000 R15: fffffbfff0c3544a
[ 0.041157][ T0] FS: 0000000000000000(0000) GS:ffffffff852c1000(0000) knlGS:0000000000000000
[ 0.041779][ T0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 0.042239][ T0] CR2: ffff88843ffff000 CR3: 00000000052a1000 CR4: 00000000000000b0
[ 0.042794][ T0] Call Trace:
[ 0.043021][ T0] <TASK>
[ 0.043223][ T0] ? show_regs (arch/x86/kernel/dumpstack.c:479)
[ 0.043523][ T0] ? __warn (kernel/panic.c:242)
[ 0.043821][ T0] ? __early_ioremap (mm/early_ioremap.c:139 (discriminator 10))
[ 0.044166][ T0] ? report_bug (lib/bug.c:?)
[ 0.044481][ T0] ? __early_ioremap (mm/early_ioremap.c:139 (discriminator 10))
[ 0.044827][ T0] ? early_fixup_exception (arch/x86/mm/extable.c:415 (discriminator 512))
[ 0.045213][ T0] ? do_early_exception (arch/x86/kernel/head64.c:384 (discriminator 1))
[ 0.045565][ T0] ? early_idt_handler_common (arch/x86/kernel/head_64.S:542)
[ 0.045954][ T0] ? __early_ioremap (mm/early_ioremap.c:139 (discriminator 10))
[ 0.046300][ T0] ? __early_ioremap (mm/early_ioremap.c:139 (discriminator 10))
[ 0.046645][ T0] ? __early_ioremap (mm/early_ioremap.c:139 (discriminator 10))
[ 0.046993][ T0] early_memremap (mm/early_ioremap.c:223)
[ 0.047308][ T0] __acpi_map_table (arch/x86/kernel/acpi/boot.c:115)
[ 0.047642][ T0] acpi_os_map_iomem (drivers/acpi/osl.c:337)
[ 0.047984][ T0] ? acpi_os_unmap_iomem (drivers/acpi/osl.c:424)
[ 0.048347][ T0] acpi_os_map_memory (drivers/acpi/osl.c:378)
[ 0.048685][ T0] acpi_tb_parse_root_table (drivers/acpi/acpica/tbutils.c:290)
[ 0.049072][ T0] ? _printk (kernel/printk/printk.c:2460)
[ 0.049360][ T0] acpi_initialize_tables (drivers/acpi/acpica/tbxface.c:113)
[ 0.049729][ T0] acpi_locate_initial_tables (drivers/acpi/tables.c:722)
[ 0.050118][ T0] acpi_boot_table_init (arch/x86/kernel/acpi/boot.c:1595)
[ 0.050467][ T0] setup_arch (arch/x86/kernel/setup.c:1096)
[ 0.050770][ T0] start_kernel (include/linux/jump_label.h:267 init/main.c:920)
[ 0.051079][ T0] x86_64_start_reservations (??:?)
[ 0.051463][ T0] x86_64_start_kernel (??:?)
[ 0.051811][ T0] common_startup_64 (arch/x86/kernel/head_64.S:421)
[ 0.052152][ T0] </TASK>
[ 0.052358][ T0] irq event stamp: 0
[ 0.052624][ T0] hardirqs last enabled at (0): 0x0
[ 0.053117][ T0] hardirqs last disabled at (0): 0x0
[ 0.053608][ T0] softirqs last enabled at (0): 0x0
[ 0.054100][ T0] softirqs last disabled at (0): 0x0
[ 0.054591][ T0] ---[ end trace 0000000000000000 ]---

The kernel config and materials to reproduce are available at: