aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
diff options
context:
space:
mode:
authorCongyu Liu <[email protected]>2022-05-23 05:35:31 +0000
committerakpm <[email protected]>2022-05-25 13:05:42 -0700
commit3159d79b56c15068aeb7e4630cd5f6dacd20fda4 (patch)
treea95d34e119be4f89bf4211f546675382e5468483 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
parent863e0d81b6683c4cbc588ad831f560c90e494bef (diff)
kcov: update pos before writing pc in trace function
In __sanitizer_cov_trace_pc(), previously we write pc before updating pos. However, some early interrupt code could bypass check_kcov_mode() check and invoke __sanitizer_cov_trace_pc(). If such interrupt is raised between writing pc and updating pos, the pc could be overitten by the recursive __sanitizer_cov_trace_pc(). As suggested by Dmitry, we cold update pos before writing pc to avoid such interleaving. Apply the same change to write_comp_data(). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Congyu Liu <[email protected]> Reviewed-by: Dmitry Vyukov <[email protected]> Cc: Andrey Konovalov <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions