bpf: extend bpf_prog_array to store pointers to the cgroup storage
authorRoman Gushchin <guro@fb.com>
Thu, 2 Aug 2018 21:27:21 +0000 (14:27 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 2 Aug 2018 22:47:32 +0000 (00:47 +0200)
commit394e40a29788820c9c0526b1c3497c9e0ec2a126
treef82d888493270cd2df836923c98f5c12fe8d7bab
parentd7bf2c10af053191e931b58704cd862fccb7f9de
bpf: extend bpf_prog_array to store pointers to the cgroup storage

This patch converts bpf_prog_array from an array of prog pointers
to the array of struct bpf_prog_array_item elements.

This allows to save a cgroup storage pointer for each bpf program
efficiently attached to a cgroup.

Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/media/rc/bpf-lirc.c
include/linux/bpf.h
kernel/bpf/cgroup.c
kernel/bpf/core.c