From: Roman Gushchin <guro@fb.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Kernel Team <Kernel-team@fb.com>, Roman Gushchin <guro@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>
Subject: [PATCH bpf-next 4/9] bpf: don't allow create maps of per-cpu cgroup local storages
Date: Fri, 21 Sep 2018 17:14:10 +0000 [thread overview]
Message-ID: <20180921171353.11050-4-guro@fb.com> (raw)
In-Reply-To: <20180921171353.11050-1-guro@fb.com>
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>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>
---
kernel/bpf/map_in_map.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
}
--
2.17.1
next prev parent reply other threads:[~2018-09-21 17:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-21 17:14 [PATCH bpf-next 1/9] bpf: extend cgroup bpf core to allow multiple cgroup storage types Roman Gushchin
2018-09-21 17:14 ` [PATCH bpf-next 2/9] bpf: rework cgroup storage pointer passing Roman Gushchin
2018-09-25 6:05 ` Song Liu
2018-09-21 17:14 ` [PATCH bpf-next 3/9] bpf: introduce per-cpu cgroup local storage Roman Gushchin
2018-09-21 17:14 ` Roman Gushchin [this message]
2018-09-21 17:14 ` [PATCH bpf-next 5/9] bpf: sync include/uapi/linux/bpf.h to tools/include/uapi/linux/bpf.h Roman Gushchin
2018-09-21 17:14 ` [PATCH bpf-next 6/9] bpftool: add support for PERCPU_CGROUP_STORAGE maps Roman Gushchin
2018-09-22 0:11 ` Jakub Kicinski
2018-09-21 17:14 ` [PATCH bpf-next 7/9] selftests/bpf: add verifier per-cpu cgroup storage tests Roman Gushchin
2018-09-21 17:14 ` [PATCH bpf-next 8/9] selftests/bpf: extend the storage test to test per-cpu cgroup storage Roman Gushchin
2018-09-21 17:14 ` [PATCH bpf-next 9/9] samples/bpf: extend test_cgrp2_attach2 test to use " Roman Gushchin
2018-09-25 5:56 ` [PATCH bpf-next 1/9] bpf: extend cgroup bpf core to allow multiple cgroup storage types Song Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180921171353.11050-4-guro@fb.com \
--to=guro@fb.com \
--cc=Kernel-team@fb.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox