diff options
| author | Andrii Nakryiko <[email protected]> | 2024-04-04 14:45:35 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2024-04-04 18:31:08 -0700 |
| commit | 1f2a74b41ea8b902687eb97c4e7e3f558801865b (patch) | |
| tree | 118282cc4c739cc119bf3428482f8433f9b72317 /tools/perf/scripts/python/Perf-Trace-Util/lib | |
| parent | f91717007217d975aa975ddabd91ae1a107b9bff (diff) | |
bpf: prevent r10 register from being marked as precise
r10 is a special register that is not under BPF program's control and is
always effectively precise. The rest of precision logic assumes that
only r0-r9 SCALAR registers are marked as precise, so prevent r10 from
being marked precise.
This can happen due to signed cast instruction allowing to do something
like `r0 = (s8)r10;`, which later, if r0 needs to be precise, would lead
to an attempt to mark r10 as precise.
Prevent this with an extra check during instruction backtracking.
Fixes: 8100928c8814 ("bpf: Support new sign-extension mov insns")
Reported-by: [email protected]
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib')
0 files changed, 0 insertions, 0 deletions