Skip to content

Commit a18062d

Browse files
Yonghong SongAlexei Starovoitov
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 7dd34d7 commit a18062d

File tree

1 file changed

+439
-0
lines changed

1 file changed

+439
-0
lines changed

0 commit comments

Comments
 (0)