diff options
author | Yonghong Song <yonghong.song@linux.dev> | 2024-09-13 08:03:32 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-09-13 13:08:06 -0700 |
commit | a18062d54a0ba35d22d2c7d3450964ada2a2ad7c (patch) | |
tree | 95cf52a605a309d58ef9255eb84696876de11f05 /tools/perf/scripts/python | |
parent | 7dd34d7b7dcf9309fc6224caf4dd5b35bedddcb7 (diff) |
selftests/bpf: Add tests for sdiv/smod overflow cases
Subtests are added to exercise the patched code which handles
- LLONG_MIN/-1
- INT_MIN/-1
- LLONG_MIN%-1
- INT_MIN%-1
where -1 could be an immediate or in a register.
Without the previous patch, all these cases will crash the kernel on
x86_64 platform.
Additional tests are added to use small values (e.g. -5/-1, 5%-1, etc.)
in order to exercise the additional logic with patched insns.
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240913150332.1188102-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions