aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/test_autoload.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2023-12-02 09:56:58 -0800
committerAlexei Starovoitov <[email protected]>2023-12-02 11:36:50 -0800
commit8fa4ecd49b81ccd9d1d87f1c8b2260e218644878 (patch)
tree6c677d87b16c5c361795841d024fb1a5f81c9944 /tools/testing/selftests/bpf/progs/test_autoload.c
parent0acd03a5bd188b0c501d285d938439618bd855c4 (diff)
bpf: enforce exact retval range on subprog/callback exit
Instead of relying on potentially imprecise tnum representation of expected return value range for callbacks and subprogs, validate that smin/smax range satisfy exact expected range of return values. E.g., if callback would need to return [0, 2] range, tnum can't represent this precisely and instead will allow [0, 3] range. By checking smin/smax range, we can make sure that subprog/callback indeed returns only valid [0, 2] range. Acked-by: Eduard Zingerman <[email protected]> Acked-by: Shung-Hsi Yu <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions