diff options
| author | Andrii Nakryiko <andrii@kernel.org> | 2023-11-02 06:37:45 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2023-11-10 05:58:39 +0300 |
| commit | 93f7378734b595fb61e89b802002fb7e3a1267d2 (patch) | |
| tree | 4b91f51e3eb45a4ef49478481e261ed6d9529a1d /include | |
| parent | f4c7e887324f5776eef6e6e47a90e0ac8058a7a8 (diff) | |
| download | linux-93f7378734b595fb61e89b802002fb7e3a1267d2.tar.xz | |
bpf: derive smin/smax from umin/max bounds
Add smin/smax derivation from appropriate umin/umax values. Previously the
logic was surprisingly asymmetric, trying to derive umin/umax from smin/smax
(if possible), but not trying to do the same in the other direction. A simple
addition to __reg64_deduce_bounds() fixes this.
Added also generic comment about u64/s64 ranges and their relationship.
Hopefully that helps readers to understand all the bounds deductions
a bit better.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Acked-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231102033759.2541186-4-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
