From: sashiko-bot@kernel.org
To: "Jiri Olsa" <jolsa@kernel.org>
Cc: bpf@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH RFC bpf-next 18/31] bpf: Add inlined functions for kprobe multi inline tests
Date: Wed, 02 Dec 2026 12:51:26 +0000 [thread overview]
Message-ID: <sashiko-outbox-245808@kernel.org> (raw)
In-Reply-To: <20261202123035.10335-19-jolsa@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] bpf: raw asm nop in test_run.c breaks build on archs without
nop mnemonic
--
commit 5d987286743a14e6df613a09586a18d8317f8a98
Author: Jiri Olsa <jolsa@kernel.org>
bpf: Add inlined functions for kprobe multi inline tests
This commit adds always-inlined helper functions and their callers in
net/bpf/test_run.c for kprobe multi inline testing via BPF tracing
test_run.
> diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
> index cc3236e3c0c45..4a50775904123 100644
> --- a/net/bpf/test_run.c
> +++ b/net/bpf/test_run.c
[ ... ]
> @@ -558,6 +559,81 @@ noinline int bpf_fentry_test10(const void *a)
> return (long)a;
> }
>
> +/*
> + * Inlined functions for kprobe multi inline tests, the outer function
> + * starts with the inner one, so their inlined instances in
> + * bpf_kprobe_multi_inline_test1 share the address.
> + */
> +static __always_inline int bpf_kprobe_multi_inline_inner(int a)
> +{
> + /*
> + * Keep an instruction in the inline site, there's no argument
> + * setup, so it's the first instruction of the outer function
> + * inline site as well.
> + */
> + asm volatile("nop");
> + return a + 1;
> +}
[ ... ]
> +static __always_inline int bpf_kprobe_multi_inline_partial(int a)
> +{
> + asm volatile("nop");
> + return a + 1;
> +}
> +
> +static __always_inline int bpf_kprobe_multi_inline_nokprobe(int a)
> +{
> + asm volatile("nop");
> + return a + 2;
> +}
[ ... ]
> +/* Inlined function with arguments for kprobe multi inline args test. */
> +static __always_inline long bpf_kprobe_multi_inline_args(int a, long b, void *c)
> +{
> + asm volatile("nop");
> + return a + b + (long)c;
> +}
[Severity: Medium]
Will raw asm volatile("nop") break the build on architectures whose
assembler does not have a bare "nop" mnemonic?
net/bpf/test_run.c is compiled on all architectures when
CONFIG_BPF_SYSCALL=y, and OpenRISC uses "l.nop" and rejects bare "nop"
as an unrecognized instruction. Using the nop() macro from
<asm/barrier.h> keeps this portable across architectures.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202123035.10335-1-jolsa@kernel.org?part=18
next prev parent reply other threads:[~2026-12-02 12:51 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 12:30 [PATCH RFC bpf-next 00/31] bpf: Attach kprobe multi link to inlined functions Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 01/31] x86/ptrace: Add regs_get_dwarf_register function Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 02/31] kprobes: Make the kprobe hash table size configurable Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 03/31] kprobes: Add enable_kprobes to enable multiple kprobes at once Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 04/31] module: Add module_sect_addr function Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 05/31] bpf: Add bpf_get_btf_vmlinux_inline function Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 06/31] bpf: Use goto labels for error path in bpf_kprobe_multi_link_attach Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 07/31] bpf: Add support to attach inlined functions with kprobe multi link Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 08/31] bpf: Add cookie support for kprobe multi inlined functions Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 09/31] bpf: Add link info " Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 10/31] bpf: Add fdinfo " Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 11/31] bpf: Add btf_for_each_module_inline function Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 12/31] bpf: Change get_modules_for_addrs to use struct modules_array Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 13/31] tbpf: Add support to attach inlined functions in modules with kprobe multi link Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 14/31] bpf: Add BPF_F_KPROBE_MULTI_INLINE_STRICT flag for " Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 15/31] bpf: Add get_func_arg[_cnt] support for kprobe multi functions Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 16/31] bpf: Add get_func_arg[_cnt] support for kprobe multi inlined functions Jiri Olsa
2026-12-02 12:55 ` sashiko-bot
2026-12-02 12:30 ` [PATCH RFC bpf-next 17/31] bpf: Add log messages for kprobe multi inline attach Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 18/31] bpf: Add inlined functions for kprobe multi inline tests Jiri Olsa
2026-12-02 12:51 ` sashiko-bot [this message]
2026-12-02 12:30 ` [PATCH RFC bpf-next 19/31] libbpf: Add inline options to bpf_kprobe_multi_opts Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 20/31] libbpf: Print kernel log for failed kprobe multi attach Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 21/31] bpftool: Display inlined functions for kprobe multi link Jiri Olsa
2026-12-02 13:00 ` sashiko-bot
2026-12-02 12:30 ` [PATCH RFC bpf-next 22/31] selftests/bpf: Add inlined functions to bpf_testmod Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 23/31] selftests/bpf: Add kprobe multi inline attach test Jiri Olsa
2026-12-02 12:50 ` sashiko-bot
2026-12-02 12:30 ` [PATCH RFC bpf-next 24/31] selftests/bpf: Add kprobe multi inline mixed test Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 25/31] selftests/bpf: Add kprobe multi inline skip test Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 26/31] selftests/bpf: Add kprobe multi inline fails test Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 27/31] selftests/bpf: Add kprobe multi inline module test Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 28/31] selftests/bpf: Add kprobe multi inline strict test Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 29/31] selftests/bpf: Add kprobe multi inline args test Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 30/31] selftests/bpf: Add kprobe multi inline bench attach test Jiri Olsa
2026-12-02 12:30 ` [PATCH RFC bpf-next 31/31] selftests/bpf: Add kprobe multi inline link info test Jiri Olsa
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-245808@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-trace-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox