bpf: Add new bpf map type to store the pointer to struct perf_event
authorKaixu Xia <xiakaixu@huawei.com>
Thu, 6 Aug 2015 07:02:34 +0000 (07:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Aug 2015 05:50:05 +0000 (22:50 -0700)
commitea317b267e9d03a8241893aa176fba7661d07579
tree75d0e648c42e56ae0f2ae0f5e33226ce4bb77fee
parent2a36f0b92eb638dd023870574eb471b1c56be9ad
bpf: Add new bpf map type to store the pointer to struct perf_event

Introduce a new bpf map type 'BPF_MAP_TYPE_PERF_EVENT_ARRAY'.
This map only stores the pointer to struct perf_event. The
user space event FDs from perf_event_open() syscall are converted
to the pointer to struct perf_event and stored in map.

Signed-off-by: Kaixu Xia <xiakaixu@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/bpf.h
include/uapi/linux/bpf.h
kernel/bpf/arraymap.c