Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
program: fix raw_tracepoint run repeat check bug
The bpf_prog_test_run_raw_tp function has a lazy check on bpf_attr->test.repeat: it checks that it's equal to 0 while it could check for <= 1. /* doesn't support data_in/out, ctx_out, duration, or repeat */ if (kattr->test.data_in || kattr->test.data_out || kattr->test.ctx_out || kattr->test.duration || kattr->test.repeat || kattr->test.batch_size) return -EINVAL; Program.run was hard setting the repeat value to 1 in case of 0, preventing running any raw_tracepoint program. Now it handles special cases with repeat <= 0, and does not touch the value, letting the kernel handle the 0 value. Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
- Loading branch information