bpf: add map helper functions push, pop, peek in more BPF programs
authorAlban Crequy <alban@kinvolk.io>
Sun, 14 Apr 2019 16:58:46 +0000 (18:58 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 16 Apr 2019 08:24:02 +0000 (10:24 +0200)
commit02a8c817a31606b6b37c2b755f6569903f44241e
treeb81884c3fa3f440f79ba70d35cbc542fe7cc519f
parenta5cb33464e53482ecc645b4b7703f5b6d151095f
bpf: add map helper functions push, pop, peek in more BPF programs

commit f1a2e44a3aec ("bpf: add queue and stack maps") introduced new BPF
helper functions:
- BPF_FUNC_map_push_elem
- BPF_FUNC_map_pop_elem
- BPF_FUNC_map_peek_elem

but they were made available only for network BPF programs. This patch
makes them available for tracepoint, cgroup and lirc programs.

Signed-off-by: Alban Crequy <alban@kinvolk.io>
Cc: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/media/rc/bpf-lirc.c
kernel/bpf/cgroup.c
kernel/trace/bpf_trace.c