diff options
author | Shung-Hsi Yu <shung-hsi.yu@suse.com> | 2025-04-18 15:49:43 +0800 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2025-04-23 10:21:24 -0700 |
commit | 53ebef53a657d7957d35dc2b953db64f1bb28065 (patch) | |
tree | ffa0a56188bff6a9eb02f4895a8897617f4d66c9 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 5cffad0a5c8f0cc53ce9fe7cff7bc67c3a97c406 (diff) |
bpf: Use proper type to calculate bpf_raw_tp_null_args.mask index
The calculation of the index used to access the mask field in 'struct
bpf_raw_tp_null_args' is done with 'int' type, which could overflow when
the tracepoint being attached has more than 8 arguments.
While none of the tracepoints mentioned in raw_tp_null_args[] currently
have more than 8 arguments, there do exist tracepoints that had more
than 8 arguments (e.g. iocost_iocg_forgive_debt), so use the correct
type for calculation and avoid Smatch static checker warning.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/bpf/20250418074946.35569-1-shung-hsi.yu@suse.com
Closes: https://lore.kernel.org/r/843a3b94-d53d-42db-93d4-be10a4090146@stanley.mountain/
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions