kernel-hacking-2024-linux-s.../scripts
Borislav Petkov d72e720a19 scripts/decodecode: add the capability to supply the program counter
So that comparing with objdump output from vmlinux can ease pinpointing
where the trapping instruction actually is.  An example is better than a
thousand words:

  $ PC=0xffffffff8329a927 ./scripts/decodecode < ~/tmp/syz/gfs2.splat
  [ 477.379104][T23917] Code: 48 83 ec 28 48 89 3c 24 48 89 54 24 08 e8 c1 b4 4a fe 48 8d bb 00 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 97 05 00 00 48 8b 9b 00 01 00 00 48 85 db 0f 84
  All code
  ========
  ffffffff8329a8fd:       48 83 ec 28             sub    $0x28,%rsp
  ffffffff8329a901:       48 89 3c 24             mov    %rdi,(%rsp)
  ffffffff8329a905:       48 89 54 24 08          mov    %rdx,0x8(%rsp)
  ffffffff8329a90a:       e8 c1 b4 4a fe          callq  0xffffffff81745dd0
  ffffffff8329a90f:       48 8d bb 00 01 00 00    lea    0x100(%rbx),%rdi
  ffffffff8329a916:       48 b8 00 00 00 00 00    movabs $0xdffffc0000000000,%rax
  ffffffff8329a91d:       fc ff df
  ffffffff8329a920:       48 89 fa                mov    %rdi,%rdx
  ffffffff8329a923:       48 c1 ea 03             shr    $0x3,%rdx
  ffffffff8329a927:*      80 3c 02 00             cmpb   $0x0,(%rdx,%rax,1)               <-- trapping instruction
  ffffffff8329a92b:       0f 85 97 05 00 00       jne    0xffffffff8329aec8
  ffffffff8329a931:       48 8b 9b 00 01 00 00    mov    0x100(%rbx),%rbx
  ffffffff8329a938:       48 85 db                test   %rbx,%rbx
  ffffffff8329a93b:       0f                      .byte 0xf
  ffffffff8329a93c:       84                      .byte 0x84

Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Marc Zyngier <maz@misterjones.org>
Cc: Will Deacon <will@kernel.org>
Cc: Rabin Vincent <rabin@rab.in>
Link: https://lkml.kernel.org/r/20200930111416.GF6810@zn.tnic
Link: https://lkml.kernel.org/r/20200929113238.GC21110@zn.tnic
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-10-13 18:38:26 -07: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 kbuild: introduce hostprogs-always-y and userprogs-always-y 2020-08-10 01:32:59 +09:00
coccinelle scripts: device_attr_show.cocci: update location of sysfs doc 2020-09-10 10:47:52 -06:00
dtc scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting 2020-09-29 15:48:08 -05:00
dummy-tools
gcc-plugins Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
gdb scripts/gdb: fix python 3.8 SyntaxWarning 2020-08-12 10:58:02 -07:00
genksyms genksyms: keywords: Use __restrict not _restrict 2020-08-18 20:16:46 +09:00
kconfig kconfig: qconf: revive help message in the info view 2020-09-20 12:58:54 +09:00
ksymoops
mod Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
package kbuild: Replace HTTP links with HTTPS ones 2020-08-10 01:32:59 +09:00
selinux Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
tracing
.gitignore
adjust_autoksyms.sh
asn1_compiler.c
bin2c.c
bloat-o-meter scripts/bloat-o-meter: Support comparing library archives 2020-08-07 11:33:21 -07:00
bootgraph.pl
bpf_helpers_doc.py bpf: Introduce SK_LOOKUP program type with a dedicated attach point 2020-07-17 20:18:16 -07:00
cc-can-link.sh
check-sysctl-docs
check_extable.sh
checkincludes.pl
checkkconfigsymbols.py kconfig: remove '---help---' support 2020-08-14 13:30:03 +09:00
checkpatch.pl checkpatch: fix the usage of capture group ( ... ) 2020-09-05 12:14:29 -07:00
checkstack.pl
checksyscalls.sh
checkversion.pl
clang-version.sh
cleanfile
cleanpatch
coccicheck
config
const_structs.checkpatch const_structs.checkpatch: add regulator_ops 2020-08-07 11:33:21 -07:00
decode_stacktrace.sh scripts/decode_stacktrace.sh: guess path to vmlinux by release name 2020-08-07 11:33:21 -07:00
decodecode scripts/decodecode: add the capability to supply the program counter 2020-10-13 18:38:26 -07:00
depmod.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract-cert.c extract-cert: add static to local data 2020-08-18 20:16:46 +09:00
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract_xc3028.pl
faddr2line
file-size.sh
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-plugin.sh
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_autoksyms.sh
gen_compile_commands.py
gen_ksymdeps.sh
get_abi.pl
get_dvb_firmware
get_maintainer.pl
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh Merge branch 'work.fdpic' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-08-07 13:29:39 -07:00
insert-sys-cert.c
jobserver-exec
kallsyms.c scripts/kallsyms: skip ppc compiler stub *.long_branch.* / *.plt_branch.* 2020-09-25 00:41:54 +09:00
Kbuild.include kbuild: stop filtering out $(GCC_PLUGINS_CFLAGS) from cc-option base 2020-08-10 01:32:59 +09:00
Kconfig.include
kernel-doc kernel-doc: add support for ____cacheline_aligned attribute 2020-09-16 12:27:28 -06:00
ld-version.sh
leaking_addresses.pl
Lindent
link-vmlinux.sh Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
Makefile kbuild: introduce hostprogs-always-y and userprogs-always-y 2020-08-10 01:32:59 +09:00
Makefile.asm-generic
Makefile.build kbuild: sort hostprogs before passing it to ifneq 2020-08-10 01:32:59 +09:00
Makefile.clean kbuild: introduce hostprogs-always-y and userprogs-always-y 2020-08-10 01:32:59 +09:00
Makefile.dtbinst
Makefile.extrawarn Makefile.extrawarn: Move sign-compare from W=2 to W=3 2020-08-18 01:52:08 +09:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host kbuild: sort hostprogs before passing it to ifneq 2020-08-10 01:32:59 +09:00
Makefile.kasan kasan: allow enabling stack tagging for tag-based mode 2020-08-07 11:33:28 -07:00
Makefile.kcov kbuild: include scripts/Makefile.* only when relevant CONFIG is enabled 2020-08-10 01:32:59 +09:00
Makefile.kcsan kcsan: Support compounded read-write instrumentation 2020-08-24 15:09:32 -07:00
Makefile.lib Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
Makefile.modfinal
Makefile.modinst
Makefile.modpost kbuild: remove redundant FORCE definition in scripts/Makefile.modpost 2020-08-02 23:09:16 +09:00
Makefile.modsign
Makefile.package
Makefile.ubsan kbuild: include scripts/Makefile.* only when relevant CONFIG is enabled 2020-08-10 01:32:59 +09:00
Makefile.userprogs
makelst
markup_oops.pl
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
module-common.lds
modules-check.sh
namespace.pl
nsdeps scripts: add dummy report mode to add_namespace.cocci 2020-07-10 14:19:58 +02:00
objdiff
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c recordmcount: Fix build failure on non arm64 2020-08-10 15:22:06 +01:00
recordmcount.h
recordmcount.pl
setlocalversion
show_delta
sign-file.c
sorttable.c s390/kernel: expand exception table logic to allow new handling options 2020-07-20 10:55:50 +02:00
sorttable.h
spdxcheck-test.sh
spdxcheck.py
spelling.txt scripts/spelling.txt: add "arbitrary" typo 2020-10-13 18:38:26 -07:00
sphinx-pre-install
split-man.pl
stackdelta
stackusage
subarch.include
tags.sh Merge branch 'locking/urgent' into locking/core, to pick up fixes 2020-10-09 08:55:17 +02:00
tools-support-relr.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh