diff options
author | Roman Gushchin <guro@fb.com> | 2018-08-02 23:27:19 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-08-03 00:47:32 +0200 |
commit | aa0ad5b0391e268bdecf6cda31268388844f8afd (patch) | |
tree | a763afafb670908f733cf1473da4e54edf360763 /kernel/bpf/local_storage.c | |
parent | bpf: introduce cgroup storage maps (diff) | |
download | linux-aa0ad5b0391e268bdecf6cda31268388844f8afd.tar.xz linux-aa0ad5b0391e268bdecf6cda31268388844f8afd.zip |
bpf: pass a pointer to a cgroup storage using pcpu variable
This commit introduces the bpf_cgroup_storage_set() helper,
which will be used to pass a pointer to a cgroup storage
to the bpf helper.
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>
Diffstat (limited to 'kernel/bpf/local_storage.c')
-rw-r--r-- | kernel/bpf/local_storage.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/bpf/local_storage.c b/kernel/bpf/local_storage.c index f23d3fdeba23..fc4e37f68f2a 100644 --- a/kernel/bpf/local_storage.c +++ b/kernel/bpf/local_storage.c @@ -7,6 +7,8 @@ #include <linux/rbtree.h> #include <linux/slab.h> +DEFINE_PER_CPU(void*, bpf_cgroup_storage); + #ifdef CONFIG_CGROUP_BPF #define LOCAL_STORAGE_CREATE_FLAG_MASK \ |