diff options
author | Roman Gushchin <guro@fb.com> | 2018-08-02 14:27:19 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-08-03 00:47:32 +0200 |
commit | aa0ad5b0391e268bdecf6cda31268388844f8afd (patch) | |
tree | a763afafb670908f733cf1473da4e54edf360763 /kernel/bpf | |
parent | de9cbbaadba5adf88a19e46df61f7054000838f6 (diff) | |
download | linux-aa0ad5b0391e268bdecf6cda31268388844f8afd.tar.bz2 |
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')
-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 \ |