mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>,
	"Alexis Lothoré" <alexis.lothore@bootlin.com>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"Ihor Solodrai" <ihor.solodrai@linux.dev>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
	"Martin KaFai Lau" <martin.lau@linux.dev>,
	"Song Liu" <song@kernel.org>,
	"Yonghong Song" <yonghong.song@linux.dev>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"Emil Tsalapatis" <emil@etsalapatis.com>,
	"Shuah Khan" <shuah@kernel.org>
Cc: <ebpf@linuxfoundation.org>,
	"Bastien Curutchet" <bastien.curutchet@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	<linux-kernel@vger.kernel.org>, <bpf@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH bpf-next 0/2] selftests/bpf: port test_ftrace.sh into test_progs
Date: Tue, 03 Nov 2026 19:50:46 +0100	[thread overview]
Message-ID: <DMLSVEMJA9UE.2H7ZSBBU81XVS@bootlin.com> (raw)
In-Reply-To: <DMLS3TW3RYF3.230ZHPCINZ0N6@gmail.com>

On Tue Nov 3, 2026 at 7:14 PM CET, Alexei Starovoitov wrote:
> On Tue, Nov 03, 2026 at 01:13 AM Alexis Lothoré <alexis.lothore@bootlin.com> wrote:
>> I initially went with a ftrace instance, but I came back to global
>> ftrace because graph function filters (set_graph_function,
>> set_graph_notrace) are not handled at instance level, only at global
>> level. But maybe setting only set_ftrace_filter and set_ftrace_notrace
>> is enough for this test ? That would indeed simplify a lot the setup.
>
> Yes. set_ftrace_filter alone is enough.
> The test needs function_graph and a trampoline on the same function.
> set_ftrace_filter of the instance does that.
>
>>>   all functions are patched       only the filtered functions
>>
>> Are all functions really patched with the current series ? It is still
>> applying filters.
>
> Yes. All but the ones in set_ftrace_notrace.
> Only set_ftrace_filter and set_ftrace_notrace decide what is patched,
> and set_ftrace_filter is empty in the series.
> set_graph_function is a run time check. Every patched function calls
> into fgraph. Then graph_entry() -> ftrace_graph_addr() drops the ones
> that are not below bpf_prog_test*.
> enabled_functions shows what is patched.

Ah, thanks for the additional explanation and the enabled_functions
hint!  That definitely clarifies something I've been struggling to
figure out.  v2 in progress with your suggestions.

Alexis

-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      reply	other threads:[~2026-11-03 18:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 18:50 Alexis Lothoré (eBPF Foundation)
2026-10-30 18:50 ` [PATCH bpf-next 1/2] selftests/bpf: add helpers to manipulate ftrace Alexis Lothoré (eBPF Foundation)
2026-10-30 19:34   ` bot+bpf-ci
2026-10-30 18:50 ` [PATCH bpf-next 2/2] selftests/bpf: port test_ftrace.sh to test_progs Alexis Lothoré (eBPF Foundation)
2026-10-31 22:54 ` [PATCH bpf-next 0/2] selftests/bpf: port test_ftrace.sh into test_progs Alexei Starovoitov
2026-11-03  9:13   ` Alexis Lothoré
2026-11-03 18:14     ` Alexei Starovoitov
2026-11-03 18:50       ` Alexis Lothoré [this message]

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=DMLSVEMJA9UE.2H7ZSBBU81XVS@bootlin.com \
    --to=alexis.lothore@bootlin.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bastien.curutchet@bootlin.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=ebpf@linuxfoundation.org \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=thomas.petazzoni@bootlin.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

all inboxes | Powered by JetHome®