# git rev-parse -q --verify ac790d09885d36143076e7e02825c541e8eee899^{commit} ac790d09885d36143076e7e02825c541e8eee899 already have revision, skipping fetch # git checkout -q -f -B kisskb ac790d09885d36143076e7e02825c541e8eee899 # git clean -qxdf # < git log -1 # commit ac790d09885d36143076e7e02825c541e8eee899 # Author: Aneesh Kumar K.V # Date: Wed Jun 29 10:39:25 2022 +0530 # # powerpc/memhotplug: Add add_pages override for PPC # # With commit ffa0b64e3be5 ("powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit") # the kernel now validate the addr against high_memory value. This results # in the below BUG_ON with dax pfns. # # [ 635.798741][T26531] kernel BUG at mm/page_alloc.c:5521! # 1:mon> e # cpu 0x1: Vector: 700 (Program Check) at [c000000007287630] # pc: c00000000055ed48: free_pages.part.0+0x48/0x110 # lr: c00000000053ca70: tlb_finish_mmu+0x80/0xd0 # sp: c0000000072878d0 # msr: 800000000282b033 # current = 0xc00000000afabe00 # paca = 0xc00000037ffff300 irqmask: 0x03 irq_happened: 0x05 # pid = 26531, comm = 50-landscape-sy # kernel BUG at :5521! # Linux version 5.19.0-rc3-14659-g4ec05be7c2e1 (kvaneesh@ltc-boston8) (gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #625 SMP Thu Jun 23 00:35:43 CDT 2022 # 1:mon> t # [link register ] c00000000053ca70 tlb_finish_mmu+0x80/0xd0 # [c0000000072878d0] c00000000053ca54 tlb_finish_mmu+0x64/0xd0 (unreliable) # [c000000007287900] c000000000539424 exit_mmap+0xe4/0x2a0 # [c0000000072879e0] c00000000019fc1c mmput+0xcc/0x210 # [c000000007287a20] c000000000629230 begin_new_exec+0x5e0/0xf40 # [c000000007287ae0] c00000000070b3cc load_elf_binary+0x3ac/0x1e00 # [c000000007287c10] c000000000627af0 bprm_execve+0x3b0/0xaf0 # [c000000007287cd0] c000000000628414 do_execveat_common.isra.0+0x1e4/0x310 # [c000000007287d80] c00000000062858c sys_execve+0x4c/0x60 # [c000000007287db0] c00000000002c1b0 system_call_exception+0x160/0x2c0 # [c000000007287e10] c00000000000c53c system_call_common+0xec/0x250 # # The fix is to make sure we update high_memory on memory hotplug. # This is similar to what x86 does in commit 3072e413e305 ("mm/memory_hotplug: introduce add_pages") # # Fixes: ffa0b64e3be5 ("powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit") # Signed-off-by: Aneesh Kumar K.V # Reviewed-by: Kefeng Wang # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20220629050925.31447-1-aneesh.kumar@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 ac790d09885d36143076e7e02825c541e8eee899 # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_defconfig # Added to kconfig CONFIG_PPC_E500MC=y # Added to kconfig CONFIG_VIRTUALIZATION=y # Added to kconfig CONFIG_KVM_E500MC=y # Added to kconfig # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig .config:4373:warning: override: reassigning to symbol PPC_E500MC .config:4374:warning: override: reassigning to symbol VIRTUALIZATION # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/build_bug.h:5, from /kisskb/src/include/linux/container_of.h:5, from /kisskb/src/include/linux/list.h:5, 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] 22 | #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) | ^ /kisskb/src/include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:13: note: in expansion of macro 'IS_ERR_VALUE' 139 | if (IS_ERR_VALUE(fep->ring_mem_addr)) | ^~~~~~~~~~~~ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:341.15-350.5: Warning (pci_device_reg): /pci@e0008000/i8259@19000: PCI unit address format error, expected "12,0" /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:341.15-350.5: Warning (pci_device_reg): /pci@e0008000/i8259@19000: PCI unit address format error, expected "12,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) Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_defconfig+KVM_powerpc-gcc11 # Build took: 0:01:00.960567