Commit 53ebef5
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 <[email protected]>
Signed-off-by: Shung-Hsi Yu <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Kumar Kartikeya Dwivedi <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Closes: https://lore.kernel.org/r/[email protected]/1 parent 5cffad0 commit 53ebef5
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6829 | 6829 | | |
6830 | 6830 | | |
6831 | 6831 | | |
6832 | | - | |
| 6832 | + | |
6833 | 6833 | | |
6834 | 6834 | | |
6835 | | - | |
| 6835 | + | |
6836 | 6836 | | |
6837 | 6837 | | |
6838 | 6838 | | |
| |||
0 commit comments