diff options
| author | Alexei Starovoitov <[email protected]> | 2022-09-02 14:10:47 -0700 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2022-09-05 15:33:05 +0200 |
| commit | 34dd3bad1a6f1dc7d18ee8dd53f1d31bffd2aee8 (patch) | |
| tree | 583d488e537f0938fb920c938bfecf5ef181bf85 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | 89dc8d0c38e0df27e580876a1681a55c686a51ff (diff) | |
bpf: Relax the requirement to use preallocated hash maps in tracing progs.
Since bpf hash map was converted to use bpf_mem_alloc it is safe to use
from tracing programs and in RT kernels.
But per-cpu hash map is still using dynamic allocation for per-cpu map
values, hence keep the warning for this map type.
In the future alloc_percpu_gfp can be front-end-ed with bpf_mem_cache
and this restriction will be completely lifted.
perf_event (NMI) bpf programs have to use preallocated hash maps,
because free_htab_elem() is using call_rcu which might crash if re-entered.
Sleepable bpf programs have to use preallocated hash maps, because
life time of the map elements is not protected by rcu_read_lock/unlock.
This restriction can be lifted in the future as well.
Signed-off-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Kumar Kartikeya Dwivedi <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions