After https://git.kernel.org/tip/c5c0ba953b8c969c5d51bf1c57f239866a97c47c, I hit the BUG_ON(!IS_ALIGNED(va->va_start, align)); in mm/vmalloc.c when building and booting at least Arch Linux ARM's 32-bit v7 and 64-bit configurations.
Bisect log
# bad: [6db29e14f4fb7bce9eb5290288e71b05c2b0d118] Add linux-next specific files for 20230606
# good: [f8dba31b0a826e691949cd4fdfa5c30defaac8c5] Merge tag 'asym-keys-fix-for-linus-v6.4-rc5' of https://github.com/robertosassu/linux
git bisect start '6db29e14f4fb7bce9eb5290288e71b05c2b0d118' 'f8dba31b0a826e691949cd4fdfa5c30defaac8c5'
# good: [ac1f8e586b1c36577285b54ceece41b52cf30874] Merge branch 'drm-next' of git://git.freedesktop.org/git/drm/drm.git
git bisect good ac1f8e586b1c36577285b54ceece41b52cf30874
# good: [f868e26144a7ecea918b853b945d6983b05ac1bf] Merge branch 'for-backlight-next' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git
git bisect good f868e26144a7ecea918b853b945d6983b05ac1bf
# bad: [76b1c80746b11cb5fff26b53f471fd81924c4f85] Merge branch 'char-misc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
git bisect bad 76b1c80746b11cb5fff26b53f471fd81924c4f85
# bad: [3509daf023c87b1c3213d2a7e977cdb4b6965d07] Merge branch 'rcu/next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
git bisect bad 3509daf023c87b1c3213d2a7e977cdb4b6965d07
# bad: [a82b4db121875930b23c97a2f2a7c623f0562bef] Merge ras/core into tip/master
git bisect bad a82b4db121875930b23c97a2f2a7c623f0562bef
# bad: [76930c89ca4b39372455924d9952373c8b462b24] Merge branch into tip/master: 'smp/core'
git bisect bad 76930c89ca4b39372455924d9952373c8b462b24
# bad: [222cbc95eb775a8d2093889ab2dbd16e5ab45860] Merge branch into tip/master: 'ras/core'
git bisect bad 222cbc95eb775a8d2093889ab2dbd16e5ab45860
# bad: [dc4e51fd9846c8890fae4216d2e169e098a3e953] Merge branch into tip/master: 'locking/core'
git bisect bad dc4e51fd9846c8890fae4216d2e169e098a3e953
# bad: [b1fe7f2cda2a003afe316ce8dfe8d3645694a67e] x86,intel_iommu: Replace cmpxchg_double()
git bisect bad b1fe7f2cda2a003afe316ce8dfe8d3645694a67e
# good: [b23e139d0b66c0216e7e9361a5021290395f504c] arch: Introduce arch_{,try_}_cmpxchg128{,_local}()
git bisect good b23e139d0b66c0216e7e9361a5021290395f504c
# bad: [6d12c8d308e68b9b0fa98ca2df4f83db4b4c965d] percpu: Wire up cmpxchg128
git bisect bad 6d12c8d308e68b9b0fa98ca2df4f83db4b4c965d
# bad: [c5c0ba953b8c969c5d51bf1c57f239866a97c47c] percpu: Add {raw,this}_cpu_try_cmpxchg()
git bisect bad c5c0ba953b8c969c5d51bf1c57f239866a97c47c
# good: [8c8b096a23d12fedf3c0f50524f30113ef97aa8c] instrumentation: Wire up cmpxchg128()
git bisect good 8c8b096a23d12fedf3c0f50524f30113ef97aa8c
# first bad commit: [c5c0ba953b8c969c5d51bf1c57f239866a97c47c] percpu: Add {raw,this}_cpu_try_cmpxchg()
ARCH=arm64 reproduction steps
$ curl -LSso .config https://github.com/archlinuxarm/PKGBUILDs/raw/master/core/linux-aarch64/config
$ make -skj"$(nproc)" ARCH=arm64 LLVM=1 olddefconfig Image.gz
...
$ boot-qemu.py -k . -t 15s
...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x000f0510]
[ 0.000000] Linux version 6.4.0-rc2-ARCH+ (nathan@dev-arch.thelio-3990X) (ClangBuiltLinux clang version 17.0.0 (https://github.com/llvm/llvm-project 5ac240bbea14d4edd0c484f5f879cd0f26be59e3), ClangBuiltLinux LLD 17.0.0) #1 SMP PREEMPT_DYNAMIC Tue Jun 6 15:21:46 MST 2023
...
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] kernel BUG at mm/vmalloc.c:1638!
[ 0.000000] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-rc2-ARCH+ #1
[ 0.000000] Hardware name: linux,dummy-virt (DT)
[ 0.000000] pstate: 200000c9 (nzCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 0.000000] pc : alloc_vmap_area+0x7ec/0x7f8
[ 0.000000] lr : alloc_vmap_area+0x7e8/0x7f8
[ 0.000000] sp : ffff800009e73c10
[ 0.000000] x29: ffff800009e73c70 x28: 0000000000007fff x27: ffff800009cd0548
[ 0.000000] x26: ffff800009e87300 x25: ffffffffffff8000 x24: ffff80000a342068
[ 0.000000] x23: ffff000002805000 x22: 0000000000005000 x21: 0000000000000000
[ 0.000000] x20: 0000000000000001 x19: 000000000000cfff x18: ffffffffffffffff
[ 0.000000] x17: 0000000000000000 x16: 00000000000000e8 x15: 0000000000000004
[ 0.000000] x14: ffff800009ecb080 x13: 0000000000001fff x12: 0000000000402dc2
[ 0.000000] x11: 00000000000000c0 x10: 0000000000000000 x9 : 0000000000000001
[ 0.000000] x8 : ffff800016085000 x7 : 0000000000000000 x6 : 0000000000000048
[ 0.000000] x5 : 0000000000000000 x4 : ffff800009e73ba0 x3 : 0000000000000001
[ 0.000000] x2 : 0000000000000cc0 x1 : ffff800009afb70e x0 : 0000000000000000
[ 0.000000] Call trace:
[ 0.000000] alloc_vmap_area+0x7ec/0x7f8
[ 0.000000] __get_vm_area_node+0x100/0x184
[ 0.000000] __vmalloc_node_range+0x1d8/0x6a0
[ 0.000000] __vmalloc_node+0x54/0x64
[ 0.000000] init_IRQ+0x68/0xb0
[ 0.000000] start_kernel+0x1a4/0x3c4
[ 0.000000] __primary_switched+0xb4/0xbc
[ 0.000000] Code: f000c380 911c3800 944043e8 d53cd048 (d4210000)
[ 0.000000] ---[ end trace 0000000000000000 ]---
[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
...
ARCH=arm reproduction steps:
$ curl -LSso .config https://github.com/archlinuxarm/PKGBUILDs/raw/master/core/linux-armv7/config
$ make -skj"$(nproc)" ARCH=arm LLVM=1 olddefconfig zImage
...
$ boot-qemu.py -a arm -k . -t 15s
...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 6.4.0-rc2-ARCH+ (nathan@dev-arch.thelio-3990X) (ClangBuiltLinux clang version 17.0.0 (https://github.com/llvm/llvm-project 5ac240bbea14d4edd0c484f5f879cd0f26be59e3), ClangBuiltLinux LLD 17.0.0) #1 SMP PREEMPT Tue Jun 6 15:25:42 MST 2023
...
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] kernel BUG at mm/vmalloc.c:1638!
[ 0.000000] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-rc2-ARCH+ #1
[ 0.000000] Hardware name: Generic DT based system
[ 0.000000] PC is at alloc_vmap_area+0x9d0/0x9d8
[ 0.000000] LR is at alloc_vmap_area+0x9cc/0x9d8
[ 0.000000] pc : [<c0535e08>] lr : [<c0535e04>] psr: 200000d3
[ 0.000000] sp : c1d01e80 ip : c2007b8c fp : 00003fff
[ 0.000000] r10: 00006fff r9 : ffffc000 r8 : e0800000
[ 0.000000] r7 : 00003000 r6 : 00004000 r5 : 00000000 r4 : c2007b68
[ 0.000000] r3 : 00000000 r2 : 00000000 r1 : c18e0b0e r0 : 19f2c000
[ 0.000000] Flags: nzCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment none
[ 0.000000] Control: 10c5387d Table: 4020406a DAC: 00000051
[ 0.000000] Register r0 information: non-paged memory
[ 0.000000] Register r1 information: non-slab/vmalloc memory
[ 0.000000] Register r2 information: NULL pointer
[ 0.000000] Register r3 information: NULL pointer
[ 0.000000] Register r4 information: slab vmap_area start c2007b68 pointer offset 0 size 36
[ 0.000000] Register r5 information: NULL pointer
[ 0.000000] Register r6 information: non-paged memory
[ 0.000000] Register r7 information: non-paged memory
[ 0.000000] Register r8 information: non-paged memory
[ 0.000000] Register r9 information: non-paged memory
[ 0.000000] Register r10 information: non-paged memory
[ 0.000000] Register r11 information: non-paged memory
[ 0.000000] Register r12 information: slab vmap_area start c2007b68 pointer offset 36 size 36
[ 0.000000] Process swapper/0 (pid: 0, stack limit = 0x(ptrval))
[ 0.000000] Stack: (0xc1d01e80 to 0xc1d02000)
[ 0.000000] 1e80: 19f2c000 c2003a40 c1c1f9fc ffffffff 00000dc0 c2001180 00400dc0 c0557e58
[ 0.000000] 1ea0: c1d01eb0 c20077a8 00000cc0 ff800000 c1d0fc00 e0800000 00000001 00002000
[ 0.000000] 1ec0: 00000000 00000000 00003000 c2003a40 00004000 e0800000 00000022 ffffffff
[ 0.000000] 1ee0: 00400dc0 c0535f30 ffffffff 00400dc0 00000000 ff800000 00400dc0 00002000
[ 0.000000] 1f00: 00004000 00400dc0 e0800000 10c5387d 00000022 c0536728 ff800000 ffffffff
[ 0.000000] 1f20: 00400dc0 c1b0411c 00000cc0 c05101bc 00000000 c0557e58 c1d01f48 00000004
[ 0.000000] 1f40: 00000000 00000004 00000000 0000065f 00000000 c1b0411c c1d0b060 00400dc0
[ 0.000000] 1f60: c1d0b2d4 10c5387d 00000000 c0536cc4 00400dc0 0000065f 00000000 ffffffff
[ 0.000000] 1f80: c1b0411c 0000000f c1b0411c 00000000 c1c17000 c1b04200 c1b0411c c1b1da2c
[ 0.000000] 1fa0: 00000000 c1d0b005 c1b011a0 0000ffff 48392000 414fc0f0 00000000 c1b0411c
[ 0.000000] 1fc0: 00000000 c1b00900 ffffffff ffffffff 00000000 c1b00f24 00000000 c1bb6f64
[ 0.000000] 1fe0: c1b00420 00000051 10c0387d ffffffff 00000000 00000000 00000000 00000000
[ 0.000000] alloc_vmap_area from __get_vm_area_node+0xe4/0x14c
[ 0.000000] __get_vm_area_node from __vmalloc_node_range+0xb0/0x600
[ 0.000000] __vmalloc_node_range from __vmalloc_node+0x4c/0x54
[ 0.000000] __vmalloc_node from init_irq_stacks+0x64/0xbc
[ 0.000000] init_irq_stacks from init_IRQ+0x8/0x88
[ 0.000000] init_IRQ from start_kernel+0x1d8/0x398
[ 0.000000] start_kernel from 0x0
[ 0.000000] Code: e3000b0e e34c018e eb394fca ee1d0f90 (e7f001f2)
[ 0.000000] ---[ end trace 0000000000000000 ]---
[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
qemu-system-arm: terminating on signal 15 from pid 3452127 (timeout)
ERROR: QEMU timed out!
I have not figured out what is special about these configurations yet (if anything, the -next build is really broken for many in-tree configurations at the moment). I have not tried to see if older LLVM versions work or have the same issues either.
After https://git.kernel.org/tip/c5c0ba953b8c969c5d51bf1c57f239866a97c47c, I hit the
BUG_ON(!IS_ALIGNED(va->va_start, align));inmm/vmalloc.cwhen building and booting at least Arch Linux ARM's 32-bit v7 and 64-bit configurations.Bisect log
ARCH=arm64reproduction stepsARCH=armreproduction steps:I have not figured out what is special about these configurations yet (if anything, the -next build is really broken for many in-tree configurations at the moment). I have not tried to see if older LLVM versions work or have the same issues either.