android_kernel_xiaomi_sm8450/scripts
Carlos Llamas 8dd8c6ddec
scripts/decode_stacktrace.sh: optionally use LLVM utilities
GNU's addr2line can have problems parsing a vmlinux built with LLVM,
particularly when LTO was used. In order to decode the traces correctly
this patch adds the ability to switch to LLVM's utilities readelf and
addr2line. The same approach is followed by Will in [1].

Before:
  $ scripts/decode_stacktrace.sh vmlinux < kernel.log
  [17716.240635] Call trace:
  [17716.240646] skb_cow_data (??:?)
  [17716.240654] esp6_input (ld-temp.o:?)
  [17716.240666] xfrm_input (ld-temp.o:?)
  [17716.240674] xfrm6_rcv (??:?)
  [...]

After:
  $ LLVM=1 scripts/decode_stacktrace.sh vmlinux < kernel.log
  [17716.240635] Call trace:
  [17716.240646] skb_cow_data (include/linux/skbuff.h:2172 net/core/skbuff.c:4503)
  [17716.240654] esp6_input (net/ipv6/esp6.c:977)
  [17716.240666] xfrm_input (net/xfrm/xfrm_input.c:659)
  [17716.240674] xfrm6_rcv (net/ipv6/xfrm6_input.c:172)
  [...]

Note that one could set CROSS_COMPILE=llvm- instead to hack around this
issue. However, doing so can break the decodecode routine as it will
force the selection of other LLVM utilities down the line e.g. llvm-as.

[1] https://lore.kernel.org/all/20230914131225.13415-3-will@kernel.org/

Cc: Will Deacon <will@kernel.org>
Cc: John Stultz <jstultz@google.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2024-05-08 03:00:11 +03:00
..
atomic Merge branch 'kcsan' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/core 2020-10-09 08:56:02 +02:00
basic cc-wrapper: Resolve possible buffer overflow 2022-04-06 08:35:31 -07:00
clang-tools scripts: handle BrokenPipeError for python scripts 2023-03-17 08:45:15 +01:00
coccinelle Merge branch 'for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux 2020-10-18 14:20:35 -07:00
dtc scripts/dtc: Call pkg-config POSIXly correct 2022-04-08 14:40:15 +02:00
dummy-tools kbuild: check the minimum assembler version in Kconfig 2023-04-20 12:10:28 +02:00
gcc-plugins gcc-plugins: Reorganize gimple includes for GCC 13 2023-06-14 11:09:30 +02:00
gdb scripts/gdb: fix lx-timerlist for Python3 2023-05-17 11:48:06 +02:00
genksyms genksyms: keywords: Use __restrict not _restrict 2020-08-18 20:16:46 +09:00
kconfig Merge keystone/android12-5.10-keystone-qcom-release.198+ (0ebfe67) into msm-5.10 2023-12-05 16:20:08 +05:30
ksymoops
mod This is the 5.10.198 stable release 2023-10-26 17:54:46 +00:00
package builddeb: clean generated package content 2023-03-11 16:39:46 +01:00
selinux selinux: use "grep -E" instead of "egrep" 2022-10-26 13:25:17 +02:00
tracing ftrace/scripts: Update the instructions for ftrace-bisect.sh 2023-02-01 08:23:22 +01:00
.gitignore kbuild: preprocess module linker script 2020-09-25 00:36:41 +09:00
adjust_autoksyms.sh UPSTREAM: kbuild: do not include include/config/auto.conf from adjust_autoksyms.sh 2022-11-09 13:57:12 +00:00
as-version.sh kbuild: Switch to 'f' variants of integrated assembler flag 2023-04-20 12:10:28 +02:00
asn1_compiler.c ASN.1: Fix check for strdup() success 2023-04-26 11:27:42 +02:00
bin2c.c
bloat-o-meter scripts: switch explicitly to Python 3 2021-05-22 11:40:55 +02:00
bootgraph.pl
bpf_helpers_doc.py bpf: Add struct bpf_redir_neigh forward declaration to BPF helper defs 2020-10-29 15:19:04 +01:00
cc-can-link.sh
cc-version.sh UPSTREAM: kbuild: collect minimum tool versions into scripts/min-tool-version.sh 2024-05-08 03:00:09 +03:00
check_extable.sh
check-config-debug-exemptions
check-config-perf-exemptions
check-config.py
check-sysctl-docs docs: add a script to check sysctl docs 2020-02-25 03:35:16 -07:00
checkincludes.pl
checkkconfigsymbols.py scripts: handle BrokenPipeError for python scripts 2023-03-17 08:45:15 +01:00
checkpatch.pl Merge android12-5.10.4 (19057a6) into msm-5.10 2021-01-06 08:19:43 -08:00
checkstack.pl scripts/checkstack.pl: fix arm sp regex 2020-05-26 00:03:16 +09:00
checksyscalls.sh
checkversion.pl
cleanfile
cleanpatch
coccicheck scripts: coccicheck: Change default condition for parallelism 2020-10-12 10:37:56 +02:00
config tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
const_structs.checkpatch const_structs.checkpatch: add pinctrl_ops and pinmux_ops 2020-10-16 11:11:21 -07:00
decode_stacktrace.sh scripts/decode_stacktrace.sh: optionally use LLVM utilities 2024-05-08 03:00:11 +03:00
decodecode scripts/decodecode: add the capability to supply the program counter 2020-10-13 18:38:26 -07:00
depmod.sh ANDROID: Kbuild: Add support for KBUILD_MIXED_TREE 2021-04-15 10:28:24 +01:00
dev-needs.sh scripts/dev-needs: Add script to list device dependencies 2020-09-04 18:19:37 +02:00
diffconfig scripts: handle BrokenPipeError for python scripts 2023-03-17 08:45:15 +01:00
documentation-file-ref-check scripts: documentation-file-ref-check: Add line break before exit 2020-04-15 15:13:13 -06:00
export_report.pl modpost: move the namespace field in Module.symvers last 2020-03-25 08:25:55 +01:00
extract_xc3028.pl
extract-cert.c Merge 5.10.155 into android12-5.10-lts 2022-12-02 08:40:37 +00:00
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line scripts/faddr2line: Fix regression in name resolution on ppc64le 2022-12-08 11:23:54 +01:00
file-size.sh
find-unused-docs.sh scripts/find-unused-docs: Fix massive false positives 2020-02-11 04:35:23 -08:00
gcc-goto.sh
gcc-ld
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_autoksyms.sh BACKPORT: kbuild: fix UNUSED_KSYMS_WHITELIST for Clang LTO 2021-06-10 20:26:11 -07:00
gen_ksymdeps.sh kbuild: Fix 'no symbols' warning when CONFIG_TRIM_UNUSD_KSYMS=y 2021-09-18 13:40:16 +02:00
generate_cfi_kallsyms.pl ANDROID: Add missing CFI jump table symbols to kallsyms 2021-05-11 17:56:41 +00:00
generate_initcall_order.pl FROMLIST: init: lto: ensure initcall ordering 2020-12-16 08:56:33 -08:00
get_abi.pl tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
get_dvb_firmware
get_maintainer.pl get_maintainer: exclude MAINTAINERS file(s) from --git-fallback 2020-10-16 11:11:19 -07:00
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh Remove msm-5.4 propagated code 2021-01-06 21:45:01 -08:00
insert-sys-cert.c
jobserver-exec docs, parallelism: Rearrange how jobserver reservations are made 2019-11-22 10:35:18 -07:00
kallsyms.c kallsyms: fix nonconverging kallsyms table with lld 2021-02-17 11:02:24 +01:00
Kbuild.include UPSTREAM: kbuild: split cc-option and friends to scripts/Makefile.compiler 2024-05-08 03:00:10 +03:00
Kconfig.include Kbuild: skip cc-wrapper while finding version info 2024-05-08 03:00:11 +03:00
kernel-doc stddef: Introduce struct_group() helper macro 2022-11-25 17:45:54 +01:00
ld-version.sh UPSTREAM: kbuild: collect minimum tool versions into scripts/min-tool-version.sh 2024-05-08 03:00:09 +03:00
leaking_addresses.pl leaking_addresses: Always print a trailing newline 2021-11-18 14:03:57 +01:00
Lindent
link-vmlinux.sh This is the 5.10.151 stable release 2022-11-16 15:33:22 +00:00
Makefile certs: Add ability to preload revocation certs 2021-06-30 08:47:30 -04:00
Makefile.asm-generic BACKPORT: kbuild: prefix $(srctree)/ to some included Makefiles 2024-05-08 03:00:09 +03:00
Makefile.build UPSTREAM: kbuild: split cc-option and friends to scripts/Makefile.compiler 2024-05-08 03:00:10 +03:00
Makefile.clang BACKPORT: scripts/Makefile.clang: default to LLVM_IAS=1 2024-05-08 03:00:11 +03:00
Makefile.clean BACKPORT: kbuild: prefix $(srctree)/ to some included Makefiles 2024-05-08 03:00:09 +03:00
Makefile.compiler UPSTREAM: kbuild: split cc-option and friends to scripts/Makefile.compiler 2024-05-08 03:00:10 +03:00
Makefile.dtbinst BACKPORT: kbuild: prefix $(srctree)/ to some included Makefiles 2024-05-08 03:00:09 +03:00
Makefile.dtbo Makefile.dtbo: Suppress time information for ufdt_apply_overlay 2021-05-21 15:49:12 -07:00
Makefile.extrawarn Makefile.extrawarn: Move -Wcast-function-type-strict to W=1 2022-10-15 07:55:50 +02:00
Makefile.gcc-plugins gcc-plugins: Undefine LATENT_ENTROPY_PLUGIN when plugin disabled for a file 2022-08-25 11:38:10 +02:00
Makefile.headersinst BACKPORT: kbuild: prefix $(srctree)/ to some included Makefiles 2024-05-08 03:00:09 +03:00
Makefile.host kbuild: sort hostprogs before passing it to ifneq 2020-08-10 01:32:59 +09:00
Makefile.kasan Merge 5.10.33 into android12-5.10 2021-04-29 13:57:47 +02:00
Makefile.kcov kbuild: include scripts/Makefile.* only when relevant CONFIG is enabled 2020-08-10 01:32:59 +09:00
Makefile.kcsan Kbuild updates for v5.10 2020-10-22 13:13:57 -07:00
Makefile.lib BACKPORT: UPSTREAM: kbuild: rename cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22} 2024-05-08 03:00:11 +03:00
Makefile.modfinal ANDROID: Add missing CFI jump table symbols to kallsyms 2021-05-11 17:56:41 +00:00
Makefile.modinst BACKPORT: kbuild: prefix $(srctree)/ to some included Makefiles 2024-05-08 03:00:09 +03:00
Makefile.modpost BACKPORT: kbuild: prefix $(srctree)/ to some included Makefiles 2024-05-08 03:00:09 +03:00
Makefile.modsign BACKPORT: kbuild: prefix $(srctree)/ to some included Makefiles 2024-05-08 03:00:09 +03:00
Makefile.package kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables 2020-06-11 20:14:41 +09:00
Makefile.ubsan This is the 5.10.111 stable release 2022-04-21 14:27:41 +02:00
Makefile.userprogs kbuild: add infrastructure to build userspace programs 2020-05-17 18:52:01 +09:00
makelst
markup_oops.pl
min-tool-version.sh UPSTREAM: kbuild: collect minimum tool versions into scripts/min-tool-version.sh 2024-05-08 03:00:09 +03:00
mkcompile_h kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set 2021-07-25 14:36:16 +02:00
mkmakefile kbuild: get rid of $(realpath ...) from scripts/mkmakefile 2019-08-29 23:54:29 +09:00
mksysmap mksysmap: Fix the mismatch of 'L0' symbols in System.map 2022-09-23 14:17:00 +02:00
mkuboot.sh
module.lds.S Merge 5.10.138 into android12-5.10-lts 2022-08-30 12:59:52 +02:00
modules-check.sh kbuild: make module name conflict fatal error 2020-05-26 00:03:16 +09:00
nsdeps scripts: add dummy report mode to add_namespace.cocci 2020-08-11 15:33:35 +02:00
objdiff
pahole-flags.sh kbuild: Add skip_encoding_btf_enum64 option to pahole 2022-10-28 12:57:12 +02:00
parse-maintainers.pl parse-maintainers: Do not sort section content by default 2020-03-26 15:08:27 -07:00
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c recordmcount: Fix memory leaks in the uwrite function 2023-05-30 12:57:50 +01:00
recordmcount.h recordmcount: Correct st_shndx handling 2021-06-30 08:47:23 -04:00
recordmcount.pl recordmcount.pl: fix typo in s390 mcount regex 2022-01-05 12:40:29 +01:00
setlocalversion ANDROID: setlocalversion: make KMI_GENERATION optional 2021-11-17 22:43:25 +00:00
show_delta tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
sign-file.c Merge keystone/android12-5.10-keystone-qcom-release.160+ (d88a616) into msm-5.10 2023-03-14 21:44:10 +05:30
sorttable.c s390/kernel: expand exception table logic to allow new handling options 2020-07-20 10:55:50 +02:00
sorttable.h scripts/sorttable: Implement build-time ORC unwind table sorting 2019-12-13 10:47:58 +01:00
spdxcheck-test.sh
spdxcheck.py scripts/spdxcheck.py: handle license identifiers in XML comments 2020-10-02 11:31:26 +02:00
spelling.txt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2020-10-15 15:11:56 -07:00
sphinx-pre-install scripts: sphinx-pre-install: Fix ctex support on Debian 2022-01-27 10:54:36 +01:00
split-man.pl tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
stackdelta
stackusage
subarch.include
tags.sh scripts/tags.sh: Resolve gtags empty index generation 2023-07-27 08:43:31 +02:00
tools-support-relr.sh Makefile: fix GDB warning with CONFIG_RELR 2021-07-14 16:55:53 +02:00
unifdef.c
ver_linux ver_linux: Query ld cache for versions of libc/libcpp run-time 2020-02-10 13:35:15 -08:00
xen-hypercalls.sh
xz_wrap.sh kbuild: add variables for compression tools 2020-06-06 23:42:01 +09:00