# git rev-parse -q --verify 35f7eea41dba2cdfb11be7a37eb21cf010fd3220^{commit} 35f7eea41dba2cdfb11be7a37eb21cf010fd3220 already have revision, skipping fetch # 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/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-ld --version # < git log --format=%s --max-count=1 35f7eea41dba2cdfb11be7a37eb21cf010fd3220 # < make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-next_ppc6xx_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ppc6xx_defconfig # make -s -j 80 ARCH=powerpc O=/kisskb/build/powerpc-next_ppc6xx_defconfig_powerpc-gcc4.6 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2591:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1852:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:194:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/sound/ppc/awacs.c: In function 'snd_pmac_awacs_init': /kisskb/src/include/sound/control.h:208:2: warning: 'speaker_vol' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/sound/ppc/awacs.c:873:36: note: 'speaker_vol' was declared here /kisskb/src/net/bridge/br_netlink.c: In function 'br_afspec.isra.28': /kisskb/src/net/bridge/br_netlink.c:648:7: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:338:21: note: 'pdeo' was declared here /kisskb/src/fs/nfsd/nfs4xdr.c: In function 'nfsd4_encode_components_esc': /kisskb/src/fs/nfsd/nfs4xdr.c:2065:9: warning: 'str' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/udf/unicode.c: In function 'udf_name_conv_char': /kisskb/src/fs/udf/unicode.c:132:8: warning: 'c' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:248:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:228:19: note: 'i' was declared here /kisskb/src/drivers/net/tun.c: In function 'tun_get_user': /kisskb/src/drivers/net/tun.c:1831:30: warning: 'copylen' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1744:46: warning: 'linear' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/usb/core/devio.c: In function 'async_completed': /kisskb/src/drivers/usb/core/devio.c:613:23: warning: 'errno' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/mac80211/mlme.c: In function 'ieee80211_rx_mgmt_beacon': /kisskb/src/net/mac80211/mlme.c:1576:3: warning: 'pwr_level_cisco' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/mac80211/mlme.c:1533:6: note: 'pwr_level_cisco' was declared here INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa5fa40) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa4f35c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) INFO: Uncompressed kernel (size 0xa4f35c) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0xb00000) Image Name: Linux-5.3.0-rc2+ Created: Thu Sep 5 22:17:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4906135 Bytes = 4791.15 KiB = 4.68 MiB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-5.3.0-rc2+ Created: Thu Sep 5 22:17:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4936775 Bytes = 4821.07 KiB = 4.71 MiB Load Address: 00b00000 Entry Point: 00b00290 Image Name: Linux-5.3.0-rc2+ Created: Thu Sep 5 22:17:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4936268 Bytes = 4820.57 KiB = 4.71 MiB Load Address: 00b00000 Entry Point: 00b00290 Image Name: Linux-5.3.0-rc2+ Created: Thu Sep 5 22:17:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4937923 Bytes = 4822.19 KiB = 4.71 MiB Load Address: 00b00000 Entry Point: 00b00888 Image Name: Linux-5.3.0-rc2+ Created: Thu Sep 5 22:17:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4936699 Bytes = 4821.00 KiB = 4.71 MiB Load Address: 00b00000 Entry Point: 00b00290 Image Name: Linux-5.3.0-rc2+ Created: Thu Sep 5 22:17:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4938079 Bytes = 4822.34 KiB = 4.71 MiB Load Address: 00b00000 Entry Point: 00b00888 Image Name: Linux-5.3.0-rc2+ Created: Thu Sep 5 22:17:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4936082 Bytes = 4820.39 KiB = 4.71 MiB Load Address: 00b00000 Entry Point: 00b00290 Image Name: Linux-5.3.0-rc2+ Created: Thu Sep 5 22:17:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4936610 Bytes = 4820.91 KiB = 4.71 MiB Load Address: 00b00000 Entry Point: 00b00290 Image Name: Linux-5.3.0-rc2+ Created: Thu Sep 5 22:17:27 2019 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 4938081 Bytes = 4822.34 KiB = 4.71 MiB Load Address: 00b00000 Entry Point: 00b00290 Completed OK # rm -rf /kisskb/build/powerpc-next_ppc6xx_defconfig_powerpc-gcc4.6 # Build took: 0:03:06.131090