/usr/src/linux-headers-5.15.0-181/scripts
NameSizeModeActions
atomic/-0755rm
basic/-0755rm
clang-tools/-0755rm
coccinelle/-0755rm
dtc/-0755rm
dummy-tools/-0755rm
gcc-plugins/-0755rm
gdb/-0755rm
genksyms/-0755rm
kconfig/-0755rm
ksymoops/-0755rm
mod/-0755rm
package/-0755rm
selinux/-0755rm
tracing/-0755rm
.gitignore1600644editdlrm
adjust_autoksyms.sh21220755editdlrm
as-version.sh20810755editdlrm
asn1_compiler.c361800644editdlrm
bin2c.c7430644editdlrm
bloat-o-meter34450755editdlrm
bootgraph.pl57800755editdlrm
bpf_doc.py255820755editdlrm
cc-can-link.sh1660755editdlrm
cc-version.sh15490755editdlrm
check-sysctl-docs44720755editdlrm
checkdeclares.pl11230755editdlrm
checkincludes.pl19880755editdlrm
checkkconfigsymbols.py161260755editdlrm
checkpatch.pl2291280755editdlrm
checkstack.pl60010755editdlrm
checksyscalls.sh76000755editdlrm
checkversion.pl22110755editdlrm
check_extable.sh50480755editdlrm
cleanfile35420755editdlrm
cleanpatch51820755editdlrm
coccicheck80750755editdlrm
config48990755editdlrm
const_structs.checkpatch10090644editdlrm
decodecode29520755editdlrm
decode_stacktrace.sh76910755editdlrm
depmod.sh14410755editdlrm
dev-needs.sh62190755editdlrm
diffconfig42220755editdlrm
documentation-file-ref-check56870755editdlrm
export_report.pl46050755editdlrm
extract-cert.c37200644editdlrm
extract-ikconfig17340755editdlrm
extract-module-sig.pl37460755editdlrm
extract-sys-certs.pl38360755editdlrm
extract-vmlinux16950755editdlrm
extract_xc3028.pl456860755editdlrm
faddr2line83640755editdlrm
file-size.sh860755editdlrm
find-unused-docs.sh13040755editdlrm
gcc-goto.sh5110755editdlrm
gcc-ld7110755editdlrm
gcc-x86_32-has-stack-protector.sh4050755editdlrm
gcc-x86_64-has-stack-protector.sh1950755editdlrm
generate_initcall_order.pl60900755editdlrm
gen_autoksyms.sh15090755editdlrm
gen_ksymdeps.sh5560755editdlrm
get_abi.pl154630755editdlrm
get_dvb_firmware251280755editdlrm
get_feat.pl146890755editdlrm
get_maintainer.pl687440755editdlrm
gfp-translate17320755editdlrm
headerdep.pl35870755editdlrm
headers_check.pl38190755editdlrm
headers_install.sh34310755editdlrm
insert-sys-cert.c133920644editdlrm
jobserver-exec22130755editdlrm
kallsyms.c184980644editdlrm
Kbuild.include103920644editdlrm
Kconfig.include26350644editdlrm
kernel-doc703880755editdlrm
ld-version.sh18640755editdlrm
leaking_addresses.pl131120755editdlrm
Lindent5020755editdlrm
link-vmlinux.sh111810755editdlrm
Makefile16810644editdlrm
Makefile.asm-generic18640644editdlrm
Makefile.build201350644editdlrm
Makefile.clang16020644editdlrm
Makefile.clean22540644editdlrm
Makefile.compiler28060644editdlrm
Makefile.dtbinst10070644editdlrm
Makefile.extrawarn30920644editdlrm
Makefile.gcc-plugins27780644editdlrm
Makefile.headersinst29500644editdlrm
Makefile.host47430644editdlrm
Makefile.kasan17150644editdlrm
Makefile.kcov3330644editdlrm
Makefile.kcsan7390644editdlrm
Makefile.lib184550644editdlrm
Makefile.modfinal27930644editdlrm
Makefile.modinst25810644editdlrm
Makefile.modpost44780644editdlrm
Makefile.package67710644editdlrm
Makefile.ubsan7700644editdlrm
Makefile.userprogs16070644editdlrm
makelst8080755editdlrm
markup_oops.pl81100755editdlrm
min-tool-version.sh5580755editdlrm
mkcompile_h25410755editdlrm
mksysmap13690755editdlrm
mkuboot.sh4140755editdlrm
module.lds.S16910644editdlrm
modules-check.sh4270755editdlrm
nsdeps17650644editdlrm
objdiff29050755editdlrm
pahole-flags.sh7490755editdlrm
pahole-version.sh2690755editdlrm
parse-maintainers.pl46460755editdlrm
patch-kernel101850755editdlrm
profile2linkerlist.pl4140755editdlrm
prune-kernel7080755editdlrm
recordmcount.c171520644editdlrm
recordmcount.h198320644editdlrm
recordmcount.pl180490755editdlrm
remove-stale-files13360755editdlrm
setlocalversion35800755editdlrm
show_delta30870755editdlrm
sign-file.c101720644editdlrm
sorttable.c89490644editdlrm
sorttable.h100630644editdlrm
spdxcheck-test.sh2770644editdlrm
spdxcheck.py103340755editdlrm
spelling.txt326460644editdlrm
sphinx-pre-install250350755editdlrm
split-man.pl6040755editdlrm
stackdelta18870755editdlrm
stackusage7940755editdlrm
subarch.include6190644editdlrm
syscallhdr.sh19350755editdlrm
syscallnr.sh14850755editdlrm
syscalltbl.sh14890755editdlrm
tags.sh101100755editdlrm
tools-support-relr.sh5460755editdlrm
ubuntu-retpoline-extract-one74340644editdlrm
unifdef.c356370644editdlrm
ver_linux26480755editdlrm
xen-hypercalls.sh3860755editdlrm
xz_wrap.sh5630755editdlrm
Edit: /usr/src/linux-headers-5.15.0-181/scripts/decodecode (2952B)
#!/bin/sh # SPDX-License-Identifier: GPL-2.0 # Disassemble the Code: line in Linux oopses # usage: decodecode < oops.file # # options: set env. variable AFLAGS=options to pass options to "as"; # e.g., to decode an i386 oops on an x86_64 system, use: # AFLAGS=--32 decodecode < 386.oops # PC=hex - the PC (program counter) the oops points to cleanup() { rm -f $T $T.s $T.o $T.oo $T.aa $T.dis exit 1 } die() { echo "$@" exit 1 } trap cleanup EXIT T=`mktemp` || die "cannot create temp file" code= cont= while read i ; do case "$i" in *Code:*) code=$i cont=yes ;; *) [ -n "$cont" ] && { xdump="$(echo $i | grep '^[[:xdigit:]<>[:space:]]\+$')" if [ -n "$xdump" ]; then code="$code $xdump" else cont= fi } ;; esac done if [ -z "$code" ]; then rm $T exit fi echo $code code=`echo $code | sed -e 's/.*Code: //'` width=`expr index "$code" ' '` width=$((($width-1)/2)) case $width in 1) type=byte ;; 2) type=2byte ;; 4) type=4byte ;; esac if [ -z "$ARCH" ]; then case `uname -m` in aarch64*) ARCH=arm64 ;; arm*) ARCH=arm ;; esac fi # Params: (tmp_file, pc_sub) disas() { t=$1 pc_sub=$2 ${CROSS_COMPILE}as $AFLAGS -o $t.o $t.s > /dev/null 2>&1 if [ "$ARCH" = "arm" ]; then if [ $width -eq 2 ]; then OBJDUMPFLAGS="-M force-thumb" fi ${CROSS_COMPILE}strip $t.o fi if [ "$ARCH" = "arm64" ]; then if [ $width -eq 4 ]; then type=inst fi ${CROSS_COMPILE}strip $t.o fi if [ $pc_sub -ne 0 ]; then if [ $PC ]; then adj_vma=$(( $PC - $pc_sub )) OBJDUMPFLAGS="$OBJDUMPFLAGS --adjust-vma=$adj_vma" fi fi ${CROSS_COMPILE}objdump $OBJDUMPFLAGS -S $t.o | \ grep -v "/tmp\|Disassembly\|\.text\|^$" > $t.dis 2>&1 } marker=`expr index "$code" "\<"` if [ $marker -eq 0 ]; then marker=`expr index "$code" "\("` fi touch $T.oo if [ $marker -ne 0 ]; then # 2 opcode bytes and a single space pc_sub=$(( $marker / 3 )) echo All code >> $T.oo echo ======== >> $T.oo beforemark=`echo "$code"` echo -n " .$type 0x" > $T.s echo $beforemark | sed -e 's/ /,0x/g; s/[<>()]//g' >> $T.s disas $T $pc_sub cat $T.dis >> $T.oo rm -f $T.o $T.s $T.dis # and fix code at-and-after marker code=`echo "$code" | cut -c$((${marker} + 1))-` fi echo Code starting with the faulting instruction > $T.aa echo =========================================== >> $T.aa code=`echo $code | sed -e 's/ [<(]/ /;s/[>)] / /;s/ /,0x/g; s/[>)]$//'` echo -n " .$type 0x" > $T.s echo $code >> $T.s disas $T 0 cat $T.dis >> $T.aa # (lines of whole $T.oo) - (lines of $T.aa, i.e. "Code starting") + 3, # i.e. the title + the "===..=" line (sed is counting from 1, 0 address is # special) faultlinenum=$(( $(wc -l $T.oo | cut -d" " -f1) - \ $(wc -l $T.aa | cut -d" " -f1) + 3)) faultline=`cat $T.dis | head -1 | cut -d":" -f2-` faultline=`echo "$faultline" | sed -e 's/\[/\\\[/g; s/\]/\\\]/g'` cat $T.oo | sed -e "${faultlinenum}s/^\([^:]*:\)\(.*\)/\1\*\2\t\t<-- trapping instruction/" echo cat $T.aa cleanup