All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Artem Dinaburg" <artem@trailofbits.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH 6.6.y] bpf: Check the helper function is valid in get_helper_proto
Date: Fri, 16 Oct 2026 02:29:40 +0000	[thread overview]
Message-ID: <sashiko-outbox-173630@kernel.org> (raw)
In-Reply-To: <20261016022203.17034-1-artem@trailofbits.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] bpf: multi-line comment style violation in bpf_tail_call_proto
--

commit f05c559892f9e9f36efa93c44d19d9d526404f49
Author: Jiri Olsa <olsajiri@gmail.com>

bpf: Check the helper function is valid in get_helper_proto

This commit adds a check in check_helper_call() to ensure the helper function
pointer is not NULL, preventing a verifier bug when config options are disabled.
It also sets the unused tail_call helper function to BPF_PTR_POISON.

Link: https://lore.kernel.org/bpf/20250814200655.945632-1-jolsa@kernel.org

> diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
> index 9fa984ee076bc..bec8876f12375 100644
> --- a/kernel/bpf/core.c
> +++ b/kernel/bpf/core.c
> @@ -2959,7 +2959,10 @@ EXPORT_SYMBOL_GPL(bpf_event_output);
>  
>  /* Always built-in helper functions. */
>  const struct bpf_func_proto bpf_tail_call_proto = {
> -	.func		= NULL,
> +	/* func is unused for tail_call, we set it to pass the
> +	 * get_func_proto check
> +	 */

[Severity: Low]
This isn't a bug, but does this multi-line comment follow the BPF subsystem's
formatting rules? It seems the opening /* should be on its own line, with the
comment text starting on the next line.

> +	.func		= BPF_PTR_POISON,
>  	.gpl_only	= false,
>  	.ret_type	= RET_VOID,
>  	.arg1_type	= ARG_PTR_TO_CTX,

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261016022203.17034-1-artem@trailofbits.com?part=1

      reply	other threads:[~2026-10-16  2:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  2:22 [PATCH 6.6.y] bpf: Check the helper function is valid in get_helper_proto Artem Dinaburg
2026-10-16  2:29 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-173630@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=artem@trailofbits.com \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.