diff options
author | Alexei Starovoitov <[email protected]> | 2021-07-14 17:54:13 -0700 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2021-07-15 22:31:10 +0200 |
commit | 86fc6ee6e246438d394e41bb7cc210b0fe724872 (patch) | |
tree | c55512a9114e4c04883ce4d25835ca3bedef473d /tools/perf/scripts/python/mem-phys-addr.py | |
parent | 40ec00abf1cc92268e3e3320b36bbb33b2224808 (diff) |
bpf: Relax verifier recursion check.
In the following bpf subprogram:
static int timer_cb(void *map, void *key, void *value)
{
bpf_timer_set_callback(.., timer_cb);
}
the 'timer_cb' is a pointer to a function.
ld_imm64 insn is used to carry this pointer.
bpf_pseudo_func() returns true for such ld_imm64 insn.
Unlike bpf_for_each_map_elem() the bpf_timer_set_callback() is asynchronous.
Relax control flow check to allow such "recursion" that is seen as an infinite
loop by check_cfg(). The distinction between bpf_for_each_map_elem() the
bpf_timer_set_callback() is done in the follow up patch.
Signed-off-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Acked-by: Toke Høiland-Jørgensen <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions