linux-imx/kernel/bpf
Alexei Starovoitov 0ae7bad570 bpf: fix check_map_func_compatibility logic
[ Upstream commit 6aff67c85c ]

The commit 35578d7984 ("bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU conuter")
introduced clever way to check bpf_helper<->map_type compatibility.
Later on commit a43eec3042 ("bpf: introduce bpf_perf_event_output() helper") adjusted
the logic and inadvertently broke it.
Get rid of the clever bool compare and go back to two-way check
from map and from helper perspective.

Fixes: a43eec3042 ("bpf: introduce bpf_perf_event_output() helper")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-05-18 18:35:04 -07:00
..
arraymap.c perf/bpf: Convert perf_event_array to use struct file 2016-01-29 08:35:25 +01:00
core.c bpf: move clearing of A/X into classic to eBPF migration prologue 2015-12-18 16:04:51 -05:00
hashtab.c bpf: hash: use per-bucket spinlock 2015-12-29 15:13:44 -05:00
helpers.c bpf: avoid copying junk bytes in bpf_get_current_comm() 2016-04-20 15:45:10 +09:00
inode.c bpf: fix refcnt overflow 2016-05-18 18:35:04 -07:00
Makefile bpf: add support for persistent maps/progs 2015-11-02 22:48:39 -05:00
syscall.c bpf: fix refcnt overflow 2016-05-18 18:35:04 -07:00
verifier.c bpf: fix check_map_func_compatibility logic 2016-05-18 18:35:04 -07:00