All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Saket Kumar Bhaskar" <skb99@linux.ibm.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v10 6/8] selftest/bpf: Add tailcall verifier selftest for powerpc64
Date: Wed, 05 Aug 2026 06:14:04 +0000	[thread overview]
Message-ID: <20260805061404.CCDC51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <83b869ecd74466a3fb08343c365494dcf144e3f6.1785906979.git.skb99@linux.ibm.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The patch introduces a multi-line comment that violates the BPF subsystem comment style.
- [Low] Redundant and misleading repetition of `__jited("...")` annotations.
--

--- Patch [6]: [PATCH v10 6/8] selftest/bpf: Add tailcall verifier selftest for powerpc64 ---
commit 93fe35d1a465f1c1dd05d30ed36bf46603bc5f71
Author: Abhishek Dubey <adubey@linux.ibm.com>

selftest/bpf: Add tailcall verifier selftest for powerpc64

This commit adds a new BPF tailcall verifier JIT selftest for the
powerpc64 architecture. It verifies the emitted JIT instructions for
tail calls, handling differences between PCREL and non-PCREL kernels.

> diff --git a/tools/testing/selftests/bpf/progs/verifier_tailcall_jit.c b/tools/testing/selftests/bpf/progs/verifier_tailcall_jit.c
> index 48fa34d2959f4..7655742f627bc 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_tailcall_jit.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_tailcall_jit.c
[ ... ]
> @@ -91,6 +91,80 @@ __jited("	popq	%rax")
>  __jited("	jmp	{{.*}}")		/* jump to tail call tgt   */
>  __jited("L0:	leave")
>  __jited("	{{(retq|jmp	0x)}}")		/* return or jump to rethunk */
> +__arch_powerpc64
> +/* program entry for main(), regular function prologue */
> +__jited("	nop")
> +__jited("...")                          /* ld 2, 16(13) absent with CONFIG_PPC_KERNEL_PCREL */
> +__jited("	li 9, 0")
> +__jited("	std 9, -8(1)")
> +__jited("	mflr 0")
> +__jited("	std 0, 16(1)")
> +__jited("	stdu 1, {{.*}}(1)")
> +/* load address and call sub() via count register */
> +/* Address materialization differs between PCREL and non-PCREL kernels.
> + * Skip the address generation sequence and verify only that the call
> + * target is loaded into CTR before branching.
> + */

[Severity: Low]
This isn't a bug, but does this comment block follow the standard BPF
subsystem comment style? 

The subsystem guidelines require multi-line comments to have the opening
characters on a dedicated line, like this:

/*
 * Address materialization differs between PCREL and non-PCREL kernels.
 * Skip the address generation sequence...
 */

> +__jited("...")
> +__jited("...")
> +__jited("...")
> +__jited("...")
> +__jited("...")

[Severity: Low]
Are these consecutive string annotations redundant?

When test_loader.c parses the "..." string via push_disasm_msg(), it merely
sets the on_next_line flag to false. Repeating it multiple times does not
force the verifier to skip exactly five instructions; it just sets the same
boolean flag repeatedly. 

Would a single annotation be sufficient to achieve the desired skip?

> +__jited("	mtctr 12")
> +__jited("	bctrl")
> +__jited("	mr	8, 3")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1785906979.git.skb99@linux.ibm.com?part=6

  reply	other threads:[~2026-08-05  6:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1785906979.git.skb99@linux.ibm.com>
2026-08-05  6:06 ` [PATCH v10 1/8] powerpc/bpf: fix alignment of long branch trampoline address Saket Kumar Bhaskar
2026-08-05  6:21   ` sashiko-bot
2026-08-06 17:15   ` Hari Bathini
2026-08-05  6:06 ` [PATCH v10 2/8] powerpc/bpf: Move out dummy_tramp_addr after Long branch stub Saket Kumar Bhaskar
2026-08-06 17:18   ` Hari Bathini
2026-08-05  6:06 ` [PATCH v10 3/8] selftest/bpf: Fixing powerpc JIT disassembly failure Saket Kumar Bhaskar
2026-08-05  7:37   ` bot+bpf-ci
2026-08-06 17:19   ` Hari Bathini
2026-08-06 17:20     ` Hari Bathini
2026-08-05  6:07 ` [PATCH v10 4/8] selftest/bpf: Enable verifier selftest for powerpc64 Saket Kumar Bhaskar
2026-08-05  7:07   ` bot+bpf-ci
2026-08-06 17:22   ` Hari Bathini
2026-08-05  6:07 ` [PATCH v10 5/8] powerpc64/bpf: fix compare instruction emitted for tailcall Saket Kumar Bhaskar
2026-08-06 17:24   ` Hari Bathini
2026-08-05  6:07 ` [PATCH v10 6/8] selftest/bpf: Add tailcall verifier selftest for powerpc64 Saket Kumar Bhaskar
2026-08-05  6:14   ` sashiko-bot [this message]
2026-08-05  6:07 ` [PATCH v10 7/8] powerpc/bpf: fix buffer overflow in JIT for large BPF programs Saket Kumar Bhaskar
2026-08-05  6:16   ` sashiko-bot
2026-08-05  7:22   ` bot+bpf-ci
2026-08-06 17:26   ` Hari Bathini
2026-08-05  6:07 ` [PATCH v10 8/8] powerpc64/bpf: fix percpu private stack leak on JIT failure Saket Kumar Bhaskar
2026-08-05  6:18   ` sashiko-bot
2026-08-06 17:27   ` Hari Bathini

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=20260805061404.CCDC51F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=skb99@linux.ibm.com \
    /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.