[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQ+c7uuVXukguvy9x2HjM9K8rj6LOa_QJ_n+MVB-bOx3uQ@mail.gmail.com>
Date: Fri, 22 Jul 2022 09:20:38 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Yosry Ahmed <yosryahmed@...gle.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Hao Luo <haoluo@...gle.com>, Tejun Heo <tj@...nel.org>,
Zefan Li <lizefan.x@...edance.com>,
Johannes Weiner <hannes@...xchg.org>,
Shuah Khan <shuah@...nel.org>,
Michal Hocko <mhocko@...nel.org>,
KP Singh <kpsingh@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
John Fastabend <john.fastabend@...il.com>,
Michal Koutný <mkoutny@...e.com>,
Roman Gushchin <roman.gushchin@...ux.dev>,
David Rientjes <rientjes@...gle.com>,
Stanislav Fomichev <sdf@...gle.com>,
Greg Thelen <gthelen@...gle.com>,
Shakeel Butt <shakeelb@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
Network Development <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>,
"open list:CONTROL GROUP (CGROUP)" <cgroups@...r.kernel.org>
Subject: Re: [PATCH bpf-next v4 1/8] btf: Add a new kfunc set which allows to
mark a function to be sleepable
On Thu, Jul 21, 2022 at 7:13 PM Yosry Ahmed <yosryahmed@...gle.com> wrote:
>
> From: Benjamin Tissoires <benjamin.tissoires@...hat.com>
>
> This allows to declare a kfunc as sleepable and prevents its use in
> a non sleepable program.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
> Signed-off-by: Yosry Ahmed <yosryahmed@...gle.com>
> ---
> include/linux/btf.h | 2 ++
> kernel/bpf/btf.c | 13 +++++++++++--
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/btf.h b/include/linux/btf.h
> index 1bfed7fa0428..6e7517573d9e 100644
> --- a/include/linux/btf.h
> +++ b/include/linux/btf.h
> @@ -18,6 +18,7 @@ enum btf_kfunc_type {
> BTF_KFUNC_TYPE_RELEASE,
> BTF_KFUNC_TYPE_RET_NULL,
> BTF_KFUNC_TYPE_KPTR_ACQUIRE,
> + BTF_KFUNC_TYPE_SLEEPABLE,
> BTF_KFUNC_TYPE_MAX,
> };
This patch needs refactoring using the new BTF_ID_FLAGS scheme.
When you do that please update the Documentation/bpf/kfuncs.rst as well.
Thanks!
Powered by blists - more mailing lists