All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mingpei CAO" <caomingpei@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf v2 2/3] bpftool: Keep struct_ops field offsets when skipping bitfields
Date: Sun, 13 Sep 2026 15:02:10 +0000	[thread overview]
Message-ID: <20260913150210.EF02B1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260913145233.1446643-3-caomingpei@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Multi-line comment does not follow the preferred BPF subsystem comment style.
--

commit 76b7f5ec797f551d88f419af56f14122daae2704
Author: Mingpei CAO <caomingpei@gmail.com>

bpftool: Keep struct_ops field offsets when skipping bitfields

This commit modifies the struct_ops skeleton generator to correctly handle
bitfields by representing unsupported bitfield storage as padding. This
prevents excessive padding generation and keeps supported fields at their
declared BTF offsets.

> diff --git a/tools/bpf/bpftool/gen.c b/tools/bpf/bpftool/gen.c
> --- a/tools/bpf/bpftool/gen.c
> +++ b/tools/bpf/bpftool/gen.c
[ ... ]
> @@ -1108,34 +1125,64 @@ static int walk_st_ops_shadow_vars(struct btf *btf, const char *ident,
[ ... ]
> +		case ST_OPS_SHADOW_OPAQUE:
> +			/* Avoid emitting named types that might conflict with
> +			 * definitions from other skeletons.
> +			 */

[Severity: Low]
This isn't a bug, but does this multi-line comment in
walk_st_ops_shadow_vars() adhere to the BPF subsystem guidelines? The
preferred style for multi-line comments under BPF-related paths requires
the opening /* to be on its own line, rather than on the same line as the
first line of text.

>  			printf("\t\t\tchar __unsupported_%d[%d];\n", i, size);
>  			break;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260913145233.1446643-1-caomingpei@gmail.com?part=2

  reply	other threads:[~2026-09-13 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-13 14:52 [PATCH bpf v2 0/3] libbpf: Validate struct_ops member offsets Mingpei CAO
2026-09-13 14:52 ` [PATCH bpf v2 1/3] libbpf: Validate struct_ops member offsets before data access Mingpei CAO
2026-09-13 15:49   ` bot+bpf-ci
2026-09-14 21:05   ` Amery Hung
2026-09-13 14:52 ` [PATCH bpf v2 2/3] bpftool: Keep struct_ops field offsets when skipping bitfields Mingpei CAO
2026-09-13 15:02   ` sashiko-bot [this message]
2026-09-13 15:49   ` bot+bpf-ci
2026-09-13 14:52 ` [PATCH bpf v2 3/3] selftests/bpf: Cover struct_ops bitfield and offset validation Mingpei CAO
2026-09-13 15:03   ` sashiko-bot
2026-09-13 15:49   ` bot+bpf-ci

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=20260913150210.EF02B1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=caomingpei@gmail.com \
    --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.