All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: adubey@linux.ibm.com
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v7 3/7] selftest/bpf: Fixing powerpc JIT disassembly failure
Date: Thu, 11 Jun 2026 11:47:53 +0000	[thread overview]
Message-ID: <20260611114753.9B8061F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260611153826.31187-4-adubey@linux.ibm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces a C++ style single-line comment (`//`) which violates the BPF subsystem comment style guidelines.
--

commit 90e32beb297573769f660f2e6d0779da36d4155e
Author: Abhishek Dubey <adubey@linux.ibm.com>

selftest/bpf: Fixing powerpc JIT disassembly failure

This commit ensures that the trampoline stubs JITed at the tail of the
epilogue do not expose the dummy trampoline address to the disassembly flow.
It prevents the disassembler from ingesting this memory address by
truncating the last bytes from JITed buffers before disassembly.

> diff --git a/tools/testing/selftests/bpf/jit_disasm_helpers.c b/tools/testing/selftests/bpf/jit_disasm_helpers.c
> index 364c557c51158..466d62b4ca285 100644
> --- a/tools/testing/selftests/bpf/jit_disasm_helpers.c
> +++ b/tools/testing/selftests/bpf/jit_disasm_helpers.c

[ ... ]

> @@ -216,9 +218,26 @@ int get_jited_program_text(int fd, char *text, size_t text_sz)

[ ... ]

>  	for (pc = 0, i = 0; i < jited_funcs; ++i) {
>  		fprintf(text_out, "func #%d:\n", i);
> -		disasm_one_func(text_out, image + pc, func_lens[i]);
> +		// Disabled JIT have zero func_lens, hence underflow
[Severity: Low]
This isn't a bug, but does this C++ style comment violate the BPF subsystem
conventions which require standard C-style block comments for single-line
comments?

> +		__u32 disasm_len = func_lens[i] > trunc_len ?
> +					func_lens[i] - trunc_len : 0;
> +		disasm_one_func(text_out, image + pc, disasm_len);
>  		fprintf(text_out, "\n");
>  		pc += func_lens[i];
>  	}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260611153826.31187-1-adubey@linux.ibm.com?part=3

  reply	other threads:[~2026-06-11 11:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 15:38 [PATCH v7 0/7] powerpc/bpf: Add support for verifier selftest adubey
2026-06-11 15:38 ` [PATCH v7 1/7] powerpc/bpf: fix alignment of long branch trampoline address adubey
2026-06-11 15:38 ` [PATCH v7 2/7] powerpc/bpf: Move out dummy_tramp_addr after Long branch stub adubey
2026-06-11 11:52   ` sashiko-bot
2026-06-11 12:18   ` bot+bpf-ci
2026-06-11 15:38 ` [PATCH v7 3/7] selftest/bpf: Fixing powerpc JIT disassembly failure adubey
2026-06-11 11:47   ` sashiko-bot [this message]
2026-06-11 15:38 ` [PATCH v7 4/7] selftest/bpf: Enable verifier selftest for powerpc64 adubey
2026-06-11 15:38 ` [PATCH v7 5/7] powerpc64/bpf: fix compare instruction emitted for tailcall adubey
2026-06-11 15:38 ` [PATCH v7 6/7] selftest/bpf: Add tailcall verifier selftest for powerpc64 adubey
2026-06-11 15:38 ` [PATCH v7 7/7] powerpc/bpf: fix buffer overflow in JIT for large BPF programs adubey
2026-06-11 12:01   ` sashiko-bot

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=20260611114753.9B8061F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=adubey@linux.ibm.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.