[rppt:hugetlb-init/v0] [dev] 2b98427856: UBSAN:shift-out-of-bounds_in_mm/mm_init.c

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-lkp
Message-ID <[email protected]>

Hello,

kernel test robot noticed "UBSAN:shift-out-of-bounds_in_mm/mm_init.c" on:

commit: 2b98427856c3bab5b9989be36f76a0b44e81099b ("dev: use arch_zone_limits_init in free_area_init")
https://git.kernel.org/cgit/linux/kernel/git/rppt/linux.git hugetlb-init/v0

in testcase: boot

config: i386-randconfig-141-20251225
compiler: gcc-13
test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G

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


+-------------------------------------------+------------+------------+
|                                           | 79e90ca6f9 | 2b98427856 |
+-------------------------------------------+------------+------------+
| boot_successes                            | 6          | 0          |
| boot_failures                             | 0          | 6          |
| UBSAN:shift-out-of-bounds_in_mm/mm_init.c | 0          | 6          |
| kernel_BUG_at_arch/x86/mm/init_32.c       | 0          | 6          |
| Oops:invalid_opcode:#[##]                 | 0          | 6          |
| EIP:arch_mm_preinit                       | 0          | 6          |
| Kernel_panic-not_syncing:Fatal_exception  | 0          | 6          |
+-------------------------------------------+------------+------------+


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 <[email protected]>
| Closes: https://lore.kernel.org/oe-lkp/[email protected]


[    0.070716][    T0] ------------[ cut here ]------------
[    0.071237][    T0] UBSAN: shift-out-of-bounds in mm/mm_init.c:2449:21
[    0.072048][    T0] shift exponent 4294967295 is too large for 32-bit type 'long unsigned int'
[    0.072859][    T0] CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted 6.19.0-rc1-00023-g2b98427856c3 #1 PREEMPT(undef)  12358efd7e0fe5d0b7a874cb915884e48f72d5eb
[    0.074145][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[    0.075111][    T0] Call Trace:
[    0.075416][    T0]  dump_stack_lvl (lib/dump_stack.c:122)
[    0.075843][    T0]  dump_stack (lib/dump_stack.c:130)
[    0.076239][    T0]  ubsan_epilogue (lib/ubsan.c:234)
[    0.076637][    T0]  __ubsan_handle_shift_out_of_bounds (lib/ubsan.c:496 lib/ubsan.c:496)
[    0.077234][    T0]  alloc_large_system_hash (mm/mm_init.c:2449 (discriminator 3))
[    0.077753][    T0]  vfs_caches_init_early (fs/dcache.c:3257 fs/dcache.c:3304)
[    0.078259][    T0]  start_kernel (init/main.c:1065)
[    0.078690][    T0]  i386_start_kernel (arch/x86/kernel/head32.c:129)
[    0.079146][    T0]  startup_32_smp (arch/x86/kernel/head_32.S:293)
[    0.079607][    T0] ---[ end trace ]---


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20251225/[email protected]



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.