Netdev List
 help / color / mirror / Atom feed
From: bot+bpf-ci@kernel.org
To: toke@redhat.com,qmo@kernel.org,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,eddyz87@gmail.com,memxor@gmail.com,martin.lau@linux.dev,song@kernel.org,yonghong.song@linux.dev,jolsa@kernel.org,emil@etsalapatis.com,ihor.solodrai@linux.dev,larysa.zaremba@intel.com,davem@davemloft.net,kuba@kernel.org,hawk@kernel.org,john.fastabend@gmail.com,sdf@fomichev.me,lorenzo@kernel.org
Cc: bpf@vger.kernel.org,netdev@vger.kernel.org,toke@redhat.com,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v3 2/4] selftests/bpf: Set BPF program flags non-destructively
Date: Tue,  1 Sep 2026 09:54:13 +0000 (UTC)	[thread overview]
Message-ID: <486e478d8eeaec63726c1284ce5f60ddd3a1f7c24fa467317b77979ad38bd306@mail.kernel.org> (raw)
In-Reply-To: <20260901-libbpf-frags-flags-v3-2-4eb6f14968b0@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2406 bytes --]

> diff --git a/tools/testing/selftests/bpf/prog_tests/attach_probe.c b/tools/testing/selftests/bpf/prog_tests/attach_probe.c
> index e8c1a619e330e..7dadb90e7b689 100644
> --- a/tools/testing/selftests/bpf/prog_tests/attach_probe.c
> +++ b/tools/testing/selftests/bpf/prog_tests/attach_probe.c
> @@ -543,8 +543,10 @@ static void test_kprobe_sleepable(void)
>  		return;
>
>  	/* sleepable kprobe test case needs flags set before loading */
> -	if (!ASSERT_OK(bpf_program__set_flags(skel->progs.handle_kprobe_sleepable,
> -		BPF_F_SLEEPABLE), "kprobe_sleepable_flags"))
> +	if (!ASSERT_OK(bpf_program__set_flags(
> +			       skel->progs.handle_kprobe_sleepable,
> +			       bpf_program__flags(skel->progs.handle_kprobe_sleepable) | BPF_F_SLEEPABLE),
> +		       "kprobe_sleepable_flags"))
>  		goto cleanup;

This isn't a bug, but would a local like
`struct bpf_program *prog = skel->progs.handle_kprobe_sleepable;` let
this keep the original one-line ASSERT_OK() shape? The read-modify-write
now names the skeleton field twice in one expression, pushing the line
to 106 columns. The other sites in this patch (bpf_verif_scale.c,
xdp_metadata.c, xdp_hw_metadata.c) already have a short prog local and
read as one clean line.

[ ... ]

> diff --git a/tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c b/tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
> index 2e0ddef77ba51..ed3fd0a88dab6 100644
> --- a/tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
> +++ b/tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c
> @@ -362,7 +362,7 @@ static void test_attach_api_fails(void)
>  	sl_skel->bss->user_ptr = sl_skel;
>
>  	err = bpf_program__set_flags(sl_skel->progs.handle_kprobe_multi_sleepable,
> -				     BPF_F_SLEEPABLE);
> +				     bpf_program__flags(sl_skel->progs.handle_kprobe_multi_sleepable) | BPF_F_SLEEPABLE);
>  	if (!ASSERT_OK(err, "sleep_skel_set_flags"))
>  		goto cleanup;

This isn't a bug, but could the program pointer be pulled into a local
here so the flags update stays inside the 100-column limit? Repeating
the 44-character skeleton field name inside its own argument list pushes
this line to 121 columns.


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/33489985893

  reply	other threads:[~2026-09-01  9:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  8:46 [PATCH bpf-next v3 0/4] libbpf: Move section-defined program flags to prog_flags Toke Høiland-Jørgensen
2026-09-01  8:46 ` [PATCH bpf-next v3 1/4] bpftool: Set BPF_F_XDP_DEV_BOUND_ONLY flag non-destructively Toke Høiland-Jørgensen
2026-09-03  0:22   ` Andrii Nakryiko
2026-09-03  7:53     ` Toke Høiland-Jørgensen
2026-09-01  8:46 ` [PATCH bpf-next v3 2/4] selftests/bpf: Set BPF program flags non-destructively Toke Høiland-Jørgensen
2026-09-01  9:54   ` bot+bpf-ci [this message]
2026-09-01  8:46 ` [PATCH bpf-next v3 3/4] libbpf: Move section-defined program flags to prog_flags Toke Høiland-Jørgensen
2026-09-01  9:54   ` bot+bpf-ci
2026-09-03  0:22     ` Andrii Nakryiko
2026-09-01  8:46 ` [PATCH bpf-next v3 4/4] selftests/bpf: Check for flag presence in bpf_program__flags() Toke Høiland-Jørgensen
2026-09-03  0:30 ` [PATCH bpf-next v3 0/4] libbpf: Move section-defined program flags to prog_flags patchwork-bot+netdevbpf

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=486e478d8eeaec63726c1284ce5f60ddd3a1f7c24fa467317b77979ad38bd306@mail.kernel.org \
    --to=bot+bpf-ci@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=hawk@kernel.org \
    --cc=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kuba@kernel.org \
    --cc=larysa.zaremba@intel.com \
    --cc=lorenzo@kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mason@kernel.org \
    --cc=memxor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=qmo@kernel.org \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=toke@redhat.com \
    --cc=yonghong.song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox