diff options
author | Andrii Nakryiko <[email protected]> | 2023-12-02 09:56:59 -0800 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2023-12-02 11:36:50 -0800 |
commit | 60a6b2c78c62d0a99ccb7ad5edc950f79e56306a (patch) | |
tree | 79f713f33847013456174f352d42e936941bfb18 /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 8fa4ecd49b81ccd9d1d87f1c8b2260e218644878 (diff) |
selftests/bpf: add selftest validating callback result is enforced
BPF verifier expects callback subprogs to return values from specified
range (typically [0, 1]). This requires that r0 at exit is both precise
(because we rely on specific value range) and is marked as read
(otherwise state comparison will ignore such register as unimportant).
Add a simple test that validates that all these conditions are enforced.
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