llvm-project/compiler-rt/lib/dfsan
Jianzhou Zhao 7fdf270965 [dfsan] Track origin at loads
The first version of origin tracking tracks only memory stores. Although
    this is sufficient for understanding correct flows, it is hard to figure
    out where an undefined value is read from. To find reading undefined values,
    we still have to do a reverse binary search from the last store in the chain
    with printing and logging at possible code paths. This is
    quite inefficient.

    Tracking memory load instructions can help this case. The main issues of
    tracking loads are performance and code size overheads.

    With tracking only stores, the code size overhead is 38%,
    memory overhead is 1x, and cpu overhead is 3x. In practice #load is much
    larger than #store, so both code size and cpu overhead increases. The
    first blocker is code size overhead: link fails if we inline tracking
    loads. The workaround is using external function calls to propagate
    metadata. This is also the workaround ASan uses. The cpu overhead
    is ~10x. This is a trade off between debuggability and performance,
    and will be used only when debugging cases that tracking only stores
    is not enough.

Reviewed By: gbalats

Differential Revision: https://reviews.llvm.org/D100967
2021-04-22 16:25:24 +00:00
..
scripts [dfsan] Updated check_custom_wrappers.sh to dedup function names 2021-03-15 19:12:08 +00:00
.clang-format [sanitizer] Remove unneeded blank lines 2018-05-09 00:44:26 +00:00
CMakeLists.txt [dfsan] Add origin chain utils 2021-02-11 19:10:11 +00:00
dfsan.cpp [dfsan] Track origin at loads 2021-04-22 16:25:24 +00:00
dfsan.h [dfsan] Add origin ABI wrappers 2021-03-19 16:23:25 +00:00
dfsan.syms.extra [dfsan] Propagate origins for callsites 2021-02-26 19:12:03 +00:00
dfsan_chained_origin_depot.cpp [dfsan] Add origin chain utils 2021-02-11 19:10:11 +00:00
dfsan_chained_origin_depot.h [dfsan] Add origin chain utils 2021-02-11 19:10:11 +00:00
dfsan_custom.cpp [dfsan] Set sigemptyset's return label to be 0 2021-03-31 21:07:44 +00:00
dfsan_flags.h [dfsan] Add origin chain utils 2021-02-11 19:10:11 +00:00
dfsan_flags.inc [dfsan] Add origin chain utils 2021-02-11 19:10:11 +00:00
dfsan_interceptors.cpp Release pages to OS when setting 0 label 2020-10-20 16:22:11 +00:00
dfsan_origin.h [dfsan] Add origin chain utils 2021-02-11 19:10:11 +00:00
dfsan_platform.h [dfsan] Fix building OriginAddr at non-linux OS 2021-02-12 05:02:14 +00:00
dfsan_thread.cpp [dfsan] Add origin ABI wrappers for thread/signal/fork 2021-03-15 16:18:00 +00:00
dfsan_thread.h [dfsan] Add origin ABI wrappers for thread/signal/fork 2021-03-15 16:18:00 +00:00
done_abilist.txt [dfsan] Ignore dfsan origin wrappers when instrumenting code 2021-03-29 00:15:26 +00:00
libc_ubuntu1404_abilist.txt