summaryrefslogtreecommitdiffstats
path: root/kernel/bpf
diff options
context:
space:
mode:
authorRoman Gushchin <guro@fb.com>2018-09-28 14:45:46 +0000
committerDaniel Borkmann <daniel@iogearbox.net>2018-10-01 16:18:33 +0200
commitc6fdcd6e0cc4dc316e3eb261025fb0abd69540b9 (patch)
tree2ba97812bcd679f80ed3473c1354e2d1f7c8b862 /kernel/bpf
parentb741f1630346defcbc8cc60f1a2bdae8b3b0036f (diff)
downloadtalos-obmc-linux-c6fdcd6e0cc4dc316e3eb261025fb0abd69540b9.tar.gz
talos-obmc-linux-c6fdcd6e0cc4dc316e3eb261025fb0abd69540b9.zip
bpf: don't allow create maps of per-cpu cgroup local storages
Explicitly forbid creating map of per-cpu cgroup local storages. This behavior matches the behavior of shared cgroup storages. Signed-off-by: Roman Gushchin <guro@fb.com> Acked-by: Song Liu <songliubraving@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel/bpf')
-rw-r--r--kernel/bpf/map_in_map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/bpf/map_in_map.c b/kernel/bpf/map_in_map.c
index 3bfbf4464416..99d243e1ad6e 100644
--- a/kernel/bpf/map_in_map.c
+++ b/kernel/bpf/map_in_map.c
@@ -24,7 +24,8 @@ struct bpf_map *bpf_map_meta_alloc(int inner_map_ufd)
* in the verifier is not enough.
*/
if (inner_map->map_type == BPF_MAP_TYPE_PROG_ARRAY ||
- inner_map->map_type == BPF_MAP_TYPE_CGROUP_STORAGE) {
+ inner_map->map_type == BPF_MAP_TYPE_CGROUP_STORAGE ||
+ inner_map->map_type == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE) {
fdput(f);
return ERR_PTR(-ENOTSUPP);
}
OpenPOWER on IntegriCloud