Re: [PATCH bpf-next v4 01/16] bpf: Add verifier diagnostics report helpers

Eduard Zingerman <[email protected]>
Newsgroups org.kernel.vger.bpf
Message-ID <[email protected]>
On Thu, 2026-08-13 at 01:33 +0200, Kumar Kartikeya Dwivedi wrote:

...

> diff --git a/kernel/bpf/diagnostics.c b/kernel/bpf/diagnostics.c
> new file mode 100644
> index 000000000000..ba57aabd399f
> --- /dev/null
> +++ b/kernel/bpf/diagnostics.c

...

> +void bpf_diag_header(struct bpf_verifier_env *env, const char *category, const char *problem)

Nit: no external users for this function.

> +{
> +	char first;
> +
> +	if (!bpf_diag_enabled(env))
> +		return;
> +
> +	category = category ?: "Verifier Error";
> +	problem = problem ?: "";
> +
> +	if (!problem[0]) {
> +		diag_write(env, "\nVerification failed: %s\n", category);
> +		return;
> +	}
> +
> +	first = toupper(problem[0]);
> +	diag_write(env, "\nVerification failed: %s: %c%s\n", category, first, problem + 1);
> +}

...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.