# git rev-parse -q --verify 909adfc66b9a1db21b5e8733e9ebfa6cd5135d74^{commit} 909adfc66b9a1db21b5e8733e9ebfa6cd5135d74 already have revision, skipping fetch # git checkout -q -f -B kisskb 909adfc66b9a1db21b5e8733e9ebfa6cd5135d74 # git clean -qxdf # < git log -1 # commit 909adfc66b9a1db21b5e8733e9ebfa6cd5135d74 # Author: Nicholas Piggin # Date: Mon Jul 27 16:09:47 2020 +1000 # # powerpc/64s/hash: Fix hash_preload running with interrupts enabled # # Commit 2f92447f9f96 ("powerpc/book3s64/hash: Use the pte_t address from the # caller") removed the local_irq_disable from hash_preload, but it was # required for more than just the page table walk: the hash pte busy bit is # effectively a lock which may be taken in interrupt context, and the local # update flag test must not be preempted before it's used. # # This solves apparent lockups with perf interrupting __hash_page_64K. If # get_perf_callchain then also takes a hash fault on the same page while it # is already locked, it will loop forever taking hash faults, which looks like # this: # # cpu 0x49e: Vector: 100 (System Reset) at [c00000001a4f7d70] # pc: c000000000072dc8: hash_page_mm+0x8/0x800 # lr: c00000000000c5a4: do_hash_page+0x24/0x38 # sp: c0002ac1cc69ac70 # msr: 8000000000081033 # current = 0xc0002ac1cc602e00 # paca = 0xc00000001de1f280 irqmask: 0x03 irq_happened: 0x01 # pid = 20118, comm = pread2_processe # Linux version 5.8.0-rc6-00345-g1fad14f18bc6 # 49e:mon> t # [c0002ac1cc69ac70] c00000000000c5a4 do_hash_page+0x24/0x38 (unreliable) # --- Exception: 300 (Data Access) at c00000000008fa60 __copy_tofrom_user_power7+0x20c/0x7ac # [link register ] c000000000335d10 copy_from_user_nofault+0xf0/0x150 # [c0002ac1cc69af70] c00032bf9fa3c880 (unreliable) # [c0002ac1cc69afa0] c000000000109df0 read_user_stack_64+0x70/0xf0 # [c0002ac1cc69afd0] c000000000109fcc perf_callchain_user_64+0x15c/0x410 # [c0002ac1cc69b060] c000000000109c00 perf_callchain_user+0x20/0x40 # [c0002ac1cc69b080] c00000000031c6cc get_perf_callchain+0x25c/0x360 # [c0002ac1cc69b120] c000000000316b50 perf_callchain+0x70/0xa0 # [c0002ac1cc69b140] c000000000316ddc perf_prepare_sample+0x25c/0x790 # [c0002ac1cc69b1a0] c000000000317350 perf_event_output_forward+0x40/0xb0 # [c0002ac1cc69b220] c000000000306138 __perf_event_overflow+0x88/0x1a0 # [c0002ac1cc69b270] c00000000010cf70 record_and_restart+0x230/0x750 # [c0002ac1cc69b620] c00000000010d69c perf_event_interrupt+0x20c/0x510 # [c0002ac1cc69b730] c000000000027d9c performance_monitor_exception+0x4c/0x60 # [c0002ac1cc69b750] c00000000000b2f8 performance_monitor_common_virt+0x1b8/0x1c0 # --- Exception: f00 (Performance Monitor) at c0000000000cb5b0 pSeries_lpar_hpte_insert+0x0/0x160 # [link register ] c0000000000846f0 __hash_page_64K+0x210/0x540 # [c0002ac1cc69ba50] 0000000000000000 (unreliable) # [c0002ac1cc69bb00] c000000000073ae0 update_mmu_cache+0x390/0x3a0 # [c0002ac1cc69bb70] c00000000037f024 wp_page_copy+0x364/0xce0 # [c0002ac1cc69bc20] c00000000038272c do_wp_page+0xdc/0xa60 # [c0002ac1cc69bc70] c0000000003857bc handle_mm_fault+0xb9c/0x1b60 # [c0002ac1cc69bd50] c00000000006c434 __do_page_fault+0x314/0xc90 # [c0002ac1cc69be20] c00000000000c5c8 handle_page_fault+0x10/0x2c # --- Exception: 300 (Data Access) at 00007fff8c861fe8 # SP (7ffff6b19660) is in userspace # # Fixes: 2f92447f9f96 ("powerpc/book3s64/hash: Use the pte_t address from the caller") # Reported-by: Athira Rajeev # Reported-by: Anton Blanchard # Signed-off-by: Nicholas Piggin # Reviewed-by: Aneesh Kumar K.V # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20200727060947.10060-1-npiggin@gmail.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 909adfc66b9a1db21b5e8733e9ebfa6cd5135d74 # < make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_smp_defconfig # < make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-fixes_mpc85xx_smp_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 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd65834) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) INFO: Uncompressed kernel (size 0xd55030) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xe00000) Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:06 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6575404 Bytes = 6421.29 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:06 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6576079 Bytes = 6421.95 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:06 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6573154 Bytes = 6419.10 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:06 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6543538 Bytes = 6390.17 KiB = 6.24 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:06 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6575428 Bytes = 6421.32 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:06 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6576070 Bytes = 6421.94 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:06 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6575426 Bytes = 6421.31 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:06 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6575059 Bytes = 6420.96 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:06 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6575056 Bytes = 6420.95 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6573189 Bytes = 6419.13 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6573188 Bytes = 6419.13 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e00314 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6573200 Bytes = 6419.14 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6575677 Bytes = 6421.56 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6576144 Bytes = 6422.02 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6576203 Bytes = 6422.07 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e002a4 Image Name: Linux-5.8.0-rc2-g909adfc66b9a Created: Tue Jul 28 02:03:07 2020 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6573233 Bytes = 6419.17 KiB = 6.27 MiB Load Address: 00e00000 Entry Point: 00e00314 Completed OK # rm -rf /kisskb/build/powerpc-fixes_mpc85xx_smp_defconfig_powerpc-gcc4.9 # Build took: 0:02:41.108343