[PATCH] bpf: update outdated comment for refactored btf_check_kfunc_arg_match()

Kexin Sun posted 1 patch 1 week, 6 days ago
kernel/bpf/verifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] bpf: update outdated comment for refactored btf_check_kfunc_arg_match()
Posted by Kexin Sun 1 week, 6 days ago
The function btf_check_kfunc_arg_match() was refactored into
check_kfunc_args() by commit 00b85860feb8 ("bpf: Rewrite kfunc
argument handling").  Update the comment accordingly.

Assisted-by: unnamed:deepseek-v3.2 coccinelle
Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>
---
 kernel/bpf/verifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index bb12ba020649..c0ecf02a1b78 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -14410,7 +14410,7 @@ static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn,
 		if (btf_type_is_ptr(t))
 			mark_btf_func_reg_size(env, regno, sizeof(void *));
 		else
-			/* scalar. ensured by btf_check_kfunc_arg_match() */
+			/* scalar. ensured by check_kfunc_args() */
 			mark_btf_func_reg_size(env, regno, t->size);
 	}
 
-- 
2.25.1
Re: [PATCH] bpf: update outdated comment for refactored btf_check_kfunc_arg_match()
Posted by Jiayuan Chen 1 week, 4 days ago
On 3/21/26 6:56 PM, Kexin Sun wrote:
> The function btf_check_kfunc_arg_match() was refactored into
> check_kfunc_args() by commit 00b85860feb8 ("bpf: Rewrite kfunc
> argument handling").  Update the comment accordingly.
>
> Assisted-by: unnamed:deepseek-v3.2 coccinelle
> Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>


Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>

> ---
>   kernel/bpf/verifier.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index bb12ba020649..c0ecf02a1b78 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -14410,7 +14410,7 @@ static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn,
>   		if (btf_type_is_ptr(t))
>   			mark_btf_func_reg_size(env, regno, sizeof(void *));
>   		else
> -			/* scalar. ensured by btf_check_kfunc_arg_match() */
> +			/* scalar. ensured by check_kfunc_args() */
>   			mark_btf_func_reg_size(env, regno, t->size);
>   	}
>
Re: [PATCH] bpf: update outdated comment for refactored btf_check_kfunc_arg_match()
Posted by Yonghong Song 1 week, 6 days ago

On 3/21/26 3:56 AM, Kexin Sun wrote:
> The function btf_check_kfunc_arg_match() was refactored into
> check_kfunc_args() by commit 00b85860feb8 ("bpf: Rewrite kfunc
> argument handling").  Update the comment accordingly.
>
> Assisted-by: unnamed:deepseek-v3.2 coccinelle
> Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>

Acked-by: Yonghong Song <yonghong.song@linux.dev>