# git rev-parse -q --verify c1ed1754f271f6b7acb1bfdc8cfb62220fbed423^{commit} c1ed1754f271f6b7acb1bfdc8cfb62220fbed423 already have revision, skipping fetch # git checkout -q -f -B kisskb c1ed1754f271f6b7acb1bfdc8cfb62220fbed423 # git clean -qxdf # < git log -1 # commit c1ed1754f271f6b7acb1bfdc8cfb62220fbed423 # Author: Aneesh Kumar K.V # Date: Thu Jun 11 17:31:59 2020 +0530 # # powerpc/kvm/book3s64: Fix kernel crash with nested kvm & DEBUG_VIRTUAL # # With CONFIG_DEBUG_VIRTUAL=y, __pa() checks for addr value and if it's # less than PAGE_OFFSET it leads to a BUG(). # # #define __pa(x) # ({ # VIRTUAL_BUG_ON((unsigned long)(x) < PAGE_OFFSET); # (unsigned long)(x) & 0x0fffffffffffffffUL; # }) # # kernel BUG at arch/powerpc/kvm/book3s_64_mmu_radix.c:43! # cpu 0x70: Vector: 700 (Program Check) at [c0000018a2187360] # pc: c000000000161b30: __kvmhv_copy_tofrom_guest_radix+0x130/0x1f0 # lr: c000000000161d5c: kvmhv_copy_from_guest_radix+0x3c/0x80 # ... # kvmhv_copy_from_guest_radix+0x3c/0x80 # kvmhv_load_from_eaddr+0x48/0xc0 # kvmppc_ld+0x98/0x1e0 # kvmppc_load_last_inst+0x50/0x90 # kvmppc_hv_emulate_mmio+0x288/0x2b0 # kvmppc_book3s_radix_page_fault+0xd8/0x2b0 # kvmppc_book3s_hv_page_fault+0x37c/0x1050 # kvmppc_vcpu_run_hv+0xbb8/0x1080 # kvmppc_vcpu_run+0x34/0x50 # kvm_arch_vcpu_ioctl_run+0x2fc/0x410 # kvm_vcpu_ioctl+0x2b4/0x8f0 # ksys_ioctl+0xf4/0x150 # sys_ioctl+0x28/0x80 # system_call_exception+0x104/0x1d0 # system_call_common+0xe8/0x214 # # kvmhv_copy_tofrom_guest_radix() uses a NULL value for to/from to # indicate direction of copy. # # Avoid calling __pa() if the value is NULL to avoid the BUG(). # # Signed-off-by: Aneesh Kumar K.V # [mpe: Massage change log a bit to mention CONFIG_DEBUG_VIRTUAL] # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20200611120159.680284-1-aneesh.kumar@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 c1ed1754f271f6b7acb1bfdc8cfb62220fbed423 # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_defconfig # < make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 48 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/kernel.h:11:0, from /kisskb/src/include/linux/list.h:9, from /kisskb/src/include/linux/module.h:12, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ^ /kisskb/src/include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:6: note: in expansion of macro 'IS_ERR_VALUE' if (IS_ERR_VALUE(fep->ring_mem_addr)) ^ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcc7628) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) INFO: Uncompressed kernel (size 0xcb6e24) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xd00000) Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:18 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6226871 Bytes = 6080.93 KiB = 5.94 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:19 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6261424 Bytes = 6114.67 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:19 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6260041 Bytes = 6113.32 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:19 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6260070 Bytes = 6113.35 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:19 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6260100 Bytes = 6113.38 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:19 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6260091 Bytes = 6113.37 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:22 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6260117 Bytes = 6113.40 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:22 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6261487 Bytes = 6114.73 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:22 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6260081 Bytes = 6113.36 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:22 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6261660 Bytes = 6114.90 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:23 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6261702 Bytes = 6114.94 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:23 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6261489 Bytes = 6114.74 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d00314 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:23 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6261421 Bytes = 6114.67 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:23 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6260084 Bytes = 6113.36 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:23 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6261666 Bytes = 6114.91 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Image Name: Linux-5.8.0-rc2-31858-gc1ed1754f Created: Fri Jun 26 08:45:23 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6261486 Bytes = 6114.73 KiB = 5.97 MiB Load Address: 00d00000 Entry Point: 00d002a4 Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_defconfig_powerpc-gcc4.9 # Build took: 0:02:07.372761