# git rev-parse -q --verify 35f7eea41dba2cdfb11be7a37eb21cf010fd3220^{commit} # git fetch -q -n -f git://gitlab.ozlabs.ibm.com/linuxppc/linux.git next-test # git rev-parse -q --verify 35f7eea41dba2cdfb11be7a37eb21cf010fd3220^{commit} 35f7eea41dba2cdfb11be7a37eb21cf010fd3220 # git checkout -q -f -B kisskb 35f7eea41dba2cdfb11be7a37eb21cf010fd3220 # git clean -qxdf # < git log -1 # commit 35f7eea41dba2cdfb11be7a37eb21cf010fd3220 # Author: Michael Ellerman # Date: Fri Aug 23 22:29:01 2019 +1000 # # powerpc/64: Fix stacktrace on BE when function_graph is enabled # # Currently if we oops or warn while function_graph is active the stack # trace looks like: # .trace_graph_return+0xac/0x100 # .ftrace_return_to_handler+0x98/0x140 # .return_to_handler+0x20/0x40 # .return_to_handler+0x0/0x40 # .return_to_handler+0x0/0x40 # .return_to_handler+0x0/0x40 # .return_to_handler+0x0/0x40 # .return_to_handler+0x0/0x40 # .return_to_handler+0x0/0x40 # .cpu_startup_entry+0x34/0x40 # .start_secondary+0x680/0x6f0 # start_secondary_prolog+0x10/0x14 # # Notice the multiple entries that just show .return_to_handler. # # There is logic in show_stack() to detect this case and print the # traced function, but we inadvertently broke it in commit # 7d56c65a6ff9 ("powerpc/ftrace: Remove mod_return_to_handler") (2014), # because that commit accidentally removed the dereference of rth which # gets the text address from the function descriptor. Hence this is only # broken on big endian (or technically ELFv1). # # Fix it by using the proper accessor, which is ppc_function_entry(). # Result is we get a stack trace such as: # # .trace_graph_return+0x134/0x160 # .ftrace_return_to_handler+0x94/0x140 # .return_to_handler+0x20/0x40 # .return_to_handler+0x0/0x40 (.shared_cede_loop+0x48/0x130) # .return_to_handler+0x0/0x40 (.cpuidle_enter_state+0xa0/0x690) # .return_to_handler+0x0/0x40 (.cpuidle_enter+0x44/0x70) # .return_to_handler+0x0/0x40 (.call_cpuidle+0x68/0xc0) # .return_to_handler+0x0/0x40 (.do_idle+0x37c/0x400) # .return_to_handler+0x0/0x40 (.cpu_startup_entry+0x30/0x50) # .rest_init+0x224/0x348 # # Fixes: 7d56c65a6ff9 ("powerpc/ftrace: Remove mod_return_to_handler") # Signed-off-by: Michael Ellerman # Reviewed-by: Naveen N. Rao # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20190823122901.32667-1-mpe@ellerman.id.au # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-gcc --version # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-ld --version # < git log --format=%s --max-count=1 35f7eea41dba2cdfb11be7a37eb21cf010fd3220 # < make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-next_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- defconfig # make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-next_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] FIT description: Linux 5.3.0-rc2-g35f7eea41dba Created: Thu Sep 5 22:11:32 2019 Image 0 (kernel@0) Description: Linux 5.3.0-rc2-g35f7eea41dba Created: Thu Sep 5 22:11:32 2019 Type: Kernel Image Compression: gzip compressed Data Size: 4707215 Bytes = 4596.89 KiB = 4.49 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x808ae3b0 Hash algo: sha1 Hash value: cbd84d400265634fc81db2d5a6a457890c97b5c8 Image 1 (fdt@boston) Description: img,boston Device Tree Created: Thu Sep 5 22:11:32 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 3793 Bytes = 3.70 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 4799f50d688573234da6e9d7701234d394759ef4 Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Thu Sep 5 22:11:32 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Image 3 (fdt@ocelot_pcb123) Description: MSCC Ocelot PCB123 Device Tree Created: Thu Sep 5 22:11:32 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 4615 Bytes = 4.51 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 8754eadee600cac22c9c34884cd901aac7e95e8a Image 4 (fdt@ocelot_pcb120) Description: MSCC Ocelot PCB120 Device Tree Created: Thu Sep 5 22:11:32 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 5174 Bytes = 5.05 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 1ab7d0871c0a9345c6269fb491bf028224da8256 Image 5 (fdt@xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Thu Sep 5 22:11:32 2019 Type: Flat Device Tree Compression: uncompressed Data Size: 2708 Bytes = 2.64 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 63d058b780f65e22da30f0a183433765f1807f1d Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Configuration 1 (conf@boston) Description: Boston Linux kernel Kernel: kernel@0 FDT: fdt@boston Configuration 2 (conf@ni169445) Description: NI 169445 Linux Kernel Kernel: kernel@0 FDT: fdt@ni169445 Configuration 3 (conf@ocelot_pcb123) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb123 Configuration 4 (conf@ocelot_pcb120) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb120 Configuration 5 (conf@xilfpga) Description: MIPSfpga Linux kernel Kernel: kernel@0 FDT: fdt@xilfpga Completed OK # rm -rf /kisskb/build/powerpc-next_mips-defconfig_mipsel # Build took: 0:01:53.017413