From: Feng Yang <yangfeng@kylinos.cn>
task_storage_{get,delete} has been moved to bpf_base_func_proto.
Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Signed-off-by: Feng Yang <yangfeng@kylinos.cn>
---
kernel/sched/ext.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index fdbf249d1c68..cc628b009e11 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -5586,21 +5586,8 @@ static int bpf_scx_btf_struct_access(struct bpf_verifier_log *log,
return -EACCES;
}
-static const struct bpf_func_proto *
-bpf_scx_get_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
-{
- switch (func_id) {
- case BPF_FUNC_task_storage_get:
- return &bpf_task_storage_get_proto;
- case BPF_FUNC_task_storage_delete:
- return &bpf_task_storage_delete_proto;
- default:
- return bpf_base_func_proto(func_id, prog);
- }
-}
-
static const struct bpf_verifier_ops bpf_scx_verifier_ops = {
- .get_func_proto = bpf_scx_get_func_proto,
+ .get_func_proto = bpf_base_func_proto,
.is_valid_access = bpf_scx_is_valid_access,
.btf_struct_access = bpf_scx_btf_struct_access,
};
--
2.43.0
On Mon, May 5, 2025 at 11:15 PM Feng Yang <yangfeng59949@163.com> wrote:
>
> From: Feng Yang <yangfeng@kylinos.cn>
>
> task_storage_{get,delete} has been moved to bpf_base_func_proto.
>
> Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> Signed-off-by: Feng Yang <yangfeng@kylinos.cn>
> ---
> kernel/sched/ext.c | 15 +--------------
> 1 file changed, 1 insertion(+), 14 deletions(-)
>
Given this has dependency on patch #1, we should either route this
patch through bpf-next, or we'll have to delay and resend it after
merge window.
Tejun, any preferences?
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index fdbf249d1c68..cc628b009e11 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -5586,21 +5586,8 @@ static int bpf_scx_btf_struct_access(struct bpf_verifier_log *log,
> return -EACCES;
> }
>
> -static const struct bpf_func_proto *
> -bpf_scx_get_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
> -{
> - switch (func_id) {
> - case BPF_FUNC_task_storage_get:
> - return &bpf_task_storage_get_proto;
> - case BPF_FUNC_task_storage_delete:
> - return &bpf_task_storage_delete_proto;
> - default:
> - return bpf_base_func_proto(func_id, prog);
> - }
> -}
> -
> static const struct bpf_verifier_ops bpf_scx_verifier_ops = {
> - .get_func_proto = bpf_scx_get_func_proto,
> + .get_func_proto = bpf_base_func_proto,
> .is_valid_access = bpf_scx_is_valid_access,
> .btf_struct_access = bpf_scx_btf_struct_access,
> };
> --
> 2.43.0
>
On Tue, May 06, 2025 at 03:30:39PM -0700, Andrii Nakryiko wrote:
> On Mon, May 5, 2025 at 11:15 PM Feng Yang <yangfeng59949@163.com> wrote:
> >
> > From: Feng Yang <yangfeng@kylinos.cn>
> >
> > task_storage_{get,delete} has been moved to bpf_base_func_proto.
> >
> > Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> > Signed-off-by: Feng Yang <yangfeng@kylinos.cn>
> > ---
> > kernel/sched/ext.c | 15 +--------------
> > 1 file changed, 1 insertion(+), 14 deletions(-)
> >
>
> Given this has dependency on patch #1, we should either route this
> patch through bpf-next, or we'll have to delay and resend it after
> merge window.
>
> Tejun, any preferences?
Yeah, bpf-next sounds good to me and please feel free to add:
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
© 2016 - 2025 Red Hat, Inc.