# git rev-parse -q --verify 1562551aec8bb15974c69ee79b8da8cc688e7340^{commit} 1562551aec8bb15974c69ee79b8da8cc688e7340 already have revision, skipping fetch # git checkout -q -f -B kisskb 1562551aec8bb15974c69ee79b8da8cc688e7340 # git clean -qxdf # < git log -1 # commit 1562551aec8bb15974c69ee79b8da8cc688e7340 # Author: Michael Ellerman # Date: Fri Dec 16 12:43:12 2022 +1100 # # powerpc/code-patching: Fix oops with DEBUG_VM enabled # # Nathan reported that the new per-cpu mm patching oopses if DEBUG_VM is # enabled: # # ------------[ cut here ]------------ # kernel BUG at arch/powerpc/mm/pgtable.c:333! # Oops: Exception in kernel mode, sig: 5 [#1] # LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV # Modules linked in: # CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc2+ #1 # Hardware name: IBM PowerNV (emulated by qemu) POWER9 0x4e1200 opal:v7.0 PowerNV # ... # NIP assert_pte_locked+0x180/0x1a0 # LR assert_pte_locked+0x170/0x1a0 # Call Trace: # 0x60000000 (unreliable) # patch_instruction+0x618/0x6d0 # arch_prepare_kprobe+0xfc/0x2d0 # register_kprobe+0x520/0x7c0 # arch_init_kprobes+0x28/0x3c # init_kprobes+0x108/0x184 # do_one_initcall+0x60/0x2e0 # kernel_init_freeable+0x1f0/0x3e0 # kernel_init+0x34/0x1d0 # ret_from_kernel_thread+0x5c/0x64 # # Caused by the assert_spin_locked() failing in assert_pte_locked(). The # assert fails because we have unlocked the PTE in text_area_cpu_up_mm(). # # Instead leave the PTE locked and only unlock it when we tear down the # patching_mm for the CPU. That avoids the assert failing, and nothing # else should be using the PTE so leaving it locked is arguably more # correct. # # Fixes: c28c15b6d28a ("powerpc/code-patching: Use temporary mm for Radix MMU") # Reported-by: Nathan Chancellor # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 1562551aec8bb15974c69ee79b8da8cc688e7340 # < make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc86xx_defconfig # < make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-5.5.0-nolibc/powerpc64-linux/bin/powerpc64-linux- /kisskb/src/arch/powerpc/boot/dts/fsl/mvme7100.dts:135.22-137.4: Warning (pci_bridge): /pcie@f1008000: missing ranges for PCI bridge (or not a bridge) also defined at /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:92.7-117.3 /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:102.9-116.4: Warning (pci_bridge): /pcie@f1008000/pcie@0: missing ranges for PCI bridge (or not a bridge) /kisskb/src/arch/powerpc/boot/dts/fsl/mvme7100.dts:139.22-141.4: Warning (pci_bridge): /pcie@f1009000: missing ranges for PCI bridge (or not a bridge) also defined at /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:119.7-144.3 /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi:129.9-143.4: Warning (pci_bridge): /pcie@f1009000/pcie@0: missing ranges for PCI bridge (or not a bridge) arch/powerpc/boot/dts/fsl/mvme7100.dtb: Warning (unit_address_format): Failed prerequisite 'pci_bridge' arch/powerpc/boot/dts/fsl/mvme7100.dtb: Warning (pci_device_reg): Failed prerequisite 'pci_bridge' arch/powerpc/boot/dts/fsl/mvme7100.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' /kisskb/src/arch/powerpc/boot/dts/fsl/mvme7100.dts:30.11-32.6: Warning (i2c_bus_reg): /soc@f1000000/i2c@3000/rtc@68: missing or empty reg property Completed OK # rm -rf /kisskb/build/powerpc-next_mpc86xx_defconfig_powerpc-gcc5 # Build took: 0:01:06.882106