[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18d9b15319bf8d71a3cd5b08239529505714dc96.camel@gmail.com>
Date: Tue, 13 Jan 2026 13:59:43 -0800
From: Eduard Zingerman <eddyz87@...il.com>
To: Ihor Solodrai <ihor.solodrai@...ux.dev>, Alexei Starovoitov
<ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>, Daniel Borkmann
<daniel@...earbox.net>, Martin KaFai Lau <martin.lau@...ux.dev>
Cc: Mykyta Yatsenko <yatsenko@...a.com>, Tejun Heo <tj@...nel.org>, Alan
Maguire <alan.maguire@...cle.com>, Benjamin Tissoires <bentiss@...nel.org>,
Jiri Kosina <jikos@...nel.org>, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
sched-ext@...ts.linux.dev
Subject: Re: [PATCH bpf-next v1 03/10] bpf: Verifier support for
KF_IMPLICIT_ARGS
On Fri, 2026-01-09 at 10:48 -0800, Ihor Solodrai wrote:
[...]
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -3271,6 +3271,38 @@ static struct btf *find_kfunc_desc_btf(struct bpf_verifier_env *env, s16 offset)
> return btf_vmlinux ?: ERR_PTR(-ENOENT);
> }
>
> +#define KF_IMPL_SUFFIX "_impl"
> +
> +static const struct btf_type *find_kfunc_impl_proto(struct bpf_verifier_env *env,
> + struct btf *btf,
> + const char *func_name)
> +{
> + char impl_name[KSYM_SYMBOL_LEN];
Oh, as we discussed already, this should use env->tmp_str_buf.
> + const struct btf_type *func;
> + s32 impl_id;
> + int len;
> +
> + len = snprintf(impl_name, sizeof(impl_name), "%s%s", func_name, KF_IMPL_SUFFIX);
> + if (len < 0 || len >= sizeof(impl_name)) {
> + verbose(env, "function name %s%s is too long\n", func_name, KF_IMPL_SUFFIX);
> + return NULL;
> + }
[...]
Powered by blists - more mailing lists