projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b741f16
)
bpf: don't allow create maps of per-cpu cgroup local storages
author
Roman Gushchin
<
[email protected]
>
Fri, 28 Sep 2018 14:45:46 +0000
(14:45 +0000)
committer
Daniel Borkmann
<
[email protected]
>
Mon, 1 Oct 2018 14:18:33 +0000
(16:18 +0200)
Explicitly forbid creating map of per-cpu cgroup local storages.
This behavior matches the behavior of shared cgroup storages.
Signed-off-by: Roman Gushchin <
[email protected]
>
Acked-by: Song Liu <
[email protected]
>
Cc: Daniel Borkmann <
[email protected]
>
Cc: Alexei Starovoitov <
[email protected]
>
Signed-off-by: Daniel Borkmann <
[email protected]
>
kernel/bpf/map_in_map.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/map_in_map.c
b/kernel/bpf/map_in_map.c
index 3bfbf4464416b747f1d76624df2393c2d7b95078..99d243e1ad6e8e5de8f081ec8c458af34c7037c0 100644
(file)
--- 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);
}