bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Gabriele Monaco" <gmonaco@redhat.com>,
	linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH v3 10/18] tools/rv: Implement BPF monitor loading and tracing
Date: Thu, 26 Nov 2026 13:14:08 +0000	[thread overview]
Message-ID: <sashiko-outbox-235581@kernel.org> (raw)
In-Reply-To: <20261126130004.127155-11-gmonaco@redhat.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] tools/rv: undefined reference to bpf_usage_print_reactors()
  when BUILD_BPF=0
--

commit 32e1d389b743671fba97d9526fde476a03a6fc44
Author: Gabriele Monaco <gmonaco@redhat.com>

tools/rv: Implement BPF monitor loading and tracing

This commit implements BPF monitor loading, execution, and optional trace
event attachment for the rv tool.

> diff --git a/tools/verification/rv/include/utils.h b/tools/verification/rv/include/utils.h
> index 61f77a72a1a23..d6b4e60df7ffa 100644
> --- a/tools/verification/rv/include/utils.h
> +++ b/tools/verification/rv/include/utils.h
> @@ -10,11 +10,13 @@ void mon_usage(int exit_val, char *monitor_name, const char *fmt, ...);
>  int parse_arguments(char *monitor_name, int argc, char **argv);
>  
>  void ikm_usage_print_reactors(void);
> +void bpf_usage_print_reactors(void);
>  
>  struct config {
>  	bool debug;
>  	bool is_container;
>  	bool trace;
> +	bool is_bpf;
>  	int has_id;
>  	int my_pid;
>  	char *initial_reactor;
> diff --git a/tools/verification/rv/src/utils.c b/tools/verification/rv/src/utils.c
> index e19dd65ec789e..1b1ad7a3ca32e 100644
> --- a/tools/verification/rv/src/utils.c
> +++ b/tools/verification/rv/src/utils.c
> @@ -81,7 +81,10 @@ void mon_usage(int exit_val, char *monitor_name, const char *fmt, ...)
>  	for (i = 0; usage[i]; i++)
>  		fprintf(stderr, "%s\n", usage[i]);
>  
> -	ikm_usage_print_reactors();
> +	if (config.is_bpf)
> +		bpf_usage_print_reactors();
> +	else
> +		ikm_usage_print_reactors();
>  	exit(exit_val);
>  }

[Severity: Medium]
Does building rv with BUILD_BPF=0 (or without libbpf installed) fail at
link time with an undefined reference to bpf_usage_print_reactors()?

utils.o is built unconditionally, while bpf_monitor.o is only linked when
BUILD_BPF is enabled.  Should bpf_usage_print_reactors() be declared in
include/bpf_monitor.h with a static inline stub under #ifndef HAVE_LIBBPF,
like bpf_list_monitors() and bpf_run_monitor()?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261126130004.127155-1-gmonaco@redhat.com?part=10

  reply	other threads:[~2026-11-26 13:14 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 12:59 [PATCH v3 00/18] rv: Add support for BPF monitors Gabriele Monaco
2026-11-26 12:59 ` [PATCH v3 01/18] sched: Add task enqueue/dequeue trace points Gabriele Monaco
2026-11-26 13:13   ` sashiko-bot
2026-11-26 12:59 ` [PATCH v3 02/18] tools/rv: Skip empty pid error in selftest if command failed Gabriele Monaco
2026-11-26 12:59 ` [PATCH v3 03/18] rv: Add wrapper macros for monitor tracepoint definitions Gabriele Monaco
2026-11-26 12:59 ` [PATCH v3 04/18] rv: Propagate const to model strings and tracepoints Gabriele Monaco
2026-11-26 12:59 ` [PATCH v3 05/18] rv: Add generic monitor event tracepoints and BPF kfuncs Gabriele Monaco
2026-11-26 13:24   ` sashiko-bot
2026-11-26 12:59 ` [PATCH v3 06/18] tools/build: Add a feature test for bpftool-btf Gabriele Monaco
2026-11-26 12:59 ` [PATCH v3 07/18] tools/rv: Move argument parsing from in_kernel to utils Gabriele Monaco
2026-11-26 12:59 ` [PATCH v3 08/18] tools/rv: Move monitor trace handling to trace.c Gabriele Monaco
2026-11-26 12:59 ` [PATCH v3 09/18] tools/rv: Implement BPF monitor discovery and listing Gabriele Monaco
2026-11-26 13:17   ` sashiko-bot
2026-11-26 12:59 ` [PATCH v3 10/18] tools/rv: Implement BPF monitor loading and tracing Gabriele Monaco
2026-11-26 13:14   ` sashiko-bot [this message]
2026-11-26 12:59 ` [PATCH v3 11/18] tools/rv: Rework tracing to support generic events Gabriele Monaco
2026-11-26 13:13   ` sashiko-bot
2026-11-26 12:59 ` [PATCH v3 12/18] tools/rv: Copy stripped bpf_atomic.h from libarena Gabriele Monaco
2026-11-26 12:59 ` [PATCH v3 13/18] tools/rv: Add BPF monitors Gabriele Monaco
2026-11-26 13:24   ` sashiko-bot
2026-11-26 13:00 ` [PATCH v3 14/18] tools/rv: Define CONFIG_X86_64 statically for " Gabriele Monaco
2026-11-26 13:00 ` [PATCH v3 15/18] tools/rv: Add -E/--errors-only option Gabriele Monaco
2026-11-26 13:00 ` [PATCH v3 16/18] verification/rvgen: Add support for BPF monitors Gabriele Monaco
2026-11-26 13:14   ` sashiko-bot
2026-11-26 13:00 ` [PATCH v3 17/18] tools/rv: Add selftest for rv bpf monitors Gabriele Monaco
2026-11-26 13:00 ` [PATCH v3 18/18] verification/rvgen: Add selftest for rvgen -b Gabriele Monaco

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-235581@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=gmonaco@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).