linux/tools/perf/arch
Zecheng Li a1d8548c23 perf annotate: Invalidate register states for untracked instructions
When tracking variable types, instructions that modify a pointer value
in an untracked way can lead to incorrect type propagation. To prevent
this, invalidate the register state when encountering such instructions.

This change invalidates pointer types for various arithmetic and bitwise
operations that current pointer offset tracking doesn't support, like
imul, shl, and, inc, etc.

A special case is added for 'xor reg, reg', which is a common idiom for
zeroing a register. For this, the register state is updated to be a
constant with a value of 0.

This could introduce slight regressions if a variable is zeroed and then
reused. This can be addressed in the future by using all DWARF locations
for instruction tracking instead of only the first one.

Signed-off-by: Zecheng Li <zecheng@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-10-21 06:02:49 -07:00
..
alpha perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
arc/annotate perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
arm tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
arm64 perf arm_spe: Add "event_filter" entry in meta data 2025-09-19 12:14:28 -03:00
csky perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
loongarch perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
mips tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
parisc perf build: Remove Makefile.syscalls 2025-03-20 22:58:20 -07:00
powerpc perf powerpc: Add basic CONFIG_AUXTRACE support for VPA pmu on powerpc 2025-10-01 11:22:04 -03:00
riscv RISC-V: perf/kvm: Add reporting of interrupt events 2025-07-28 22:28:25 +05:30
riscv64/annotate perf disasm: Add e_machine/e_flags to struct arch 2024-11-09 08:39:13 -08:00
s390 tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
sh tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
sparc tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
x86 perf annotate: Invalidate register states for untracked instructions 2025-10-21 06:02:49 -07:00
xtensa tools headers: Sync syscall tables with the kernel source 2025-08-18 13:49:25 -07:00
Build perf util: Make util its own library 2024-06-26 11:07:42 -07:00
common.c perf tools riscv: Add support for riscv lookup_binutils_path 2023-05-12 15:21:48 -03:00
common.h perf annotate: Own objdump_path and disassembler_style strings 2023-04-04 09:39:56 -03:00