From: Yonghong Song <yhs@fb.com>
To: <bpf@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>,
Martin KaFai Lau <martin.lau@kernel.org>
Subject: [PATCH bpf-next v3 5/7] bpf: Enable sleeptable support for cgrp local storage
Date: Wed, 9 Nov 2022 13:20:10 -0800 [thread overview]
Message-ID: <20221109212010.3215575-1-yhs@fb.com> (raw)
In-Reply-To: <20221109211944.3213817-1-yhs@fb.com>
With proper bpf_rcu_read_lock() support, sleepable support for cgrp local
storage can be enabled as typical use case task->cgroups->dfl_cgrp
can be protected with bpf_rcu_read_lock().
Signed-off-by: Yonghong Song <yhs@fb.com>
---
kernel/bpf/verifier.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 2aa140dceb9a..92cd1cf64026 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -12958,10 +12958,11 @@ static int check_map_prog_compatibility(struct bpf_verifier_env *env,
case BPF_MAP_TYPE_INODE_STORAGE:
case BPF_MAP_TYPE_SK_STORAGE:
case BPF_MAP_TYPE_TASK_STORAGE:
+ case BPF_MAP_TYPE_CGRP_STORAGE:
break;
default:
verbose(env,
- "Sleepable programs can only use array, hash, and ringbuf maps\n");
+ "Sleepable programs can only use array, hash, ringbuf and local storage maps\n");
return -EINVAL;
}
--
2.30.2
next prev parent reply other threads:[~2022-11-09 21:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 21:19 [PATCH bpf-next v3 0/7] bpf: Add bpf_rcu_read_lock() support Yonghong Song
2022-11-09 21:19 ` [PATCH bpf-next v3 1/7] compiler_types: Define __rcu as __attribute__((btf_type_tag("rcu"))) Yonghong Song
2022-11-09 21:19 ` [PATCH bpf-next v3 2/7] bpf: Abstract out functions to check sleepable helpers Yonghong Song
2022-11-09 21:20 ` [PATCH bpf-next v3 3/7] bpf: Add kfunc bpf_rcu_read_lock/unlock() Yonghong Song
2022-11-09 21:20 ` [PATCH bpf-next v3 4/7] bpf: Add bpf_rcu_read_lock() verifier support Yonghong Song
2022-11-09 21:20 ` Yonghong Song [this message]
2022-11-09 21:20 ` [PATCH bpf-next v3 6/7] selftests/bpf: Add tests for bpf_rcu_read_lock() Yonghong Song
2022-11-09 21:20 ` [PATCH bpf-next v3 7/7] selftests/bpf: Add rcu_read_lock test to s390x deny list Yonghong Song
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=20221109212010.3215575-1-yhs@fb.com \
--to=yhs@fb.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=martin.lau@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