All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: bot+bpf-ci@kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	bpf@vger.kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
	songliubraving@fb.com, yhs@fb.com, qmo@kernel.org,
	martin.lau@kernel.org, yonghong.song@linux.dev, clm@meta.com,
	ihor.solodrai@linux.dev
Subject: Re: [PATCHv3 bpf-next 3/3] bpftool: Add tracing_multi link info output
Date: Mon, 29 Jun 2026 22:51:12 +0200	[thread overview]
Message-ID: <akLawCtmY4PkWDAO@krava> (raw)
In-Reply-To: <3205a51da759dfd735af18490c48f952b34dd066a1ff0d47f832b0a1a5de6469@mail.kernel.org>

On Mon, Jun 29, 2026 at 04:05:27PM +0000, bot+bpf-ci@kernel.org wrote:
> > diff --git a/tools/bpf/bpftool/link.c b/tools/bpf/bpftool/link.c
> > index bdcd717b0348..eb0ba9d71692 100644
> > --- a/tools/bpf/bpftool/link.c
> > +++ b/tools/bpf/bpftool/link.c
> > @@ -377,6 +377,25 @@ static __u64 *u64_to_arr(__u64 val)
> >  	return (__u64 *) u64_to_ptr(val);
> >  }
> >
> > +static __u32 *u64_to_u32_arr(__u64 val)
> > +{
> > +	return (__u32 *)u64_to_ptr(val);
> > +}
> > +
> > +static struct kernel_sym *find_kernel_sym_by_addr(__u64 addr, bool is_ibt_enabled)
> > +{
> > +	struct kernel_sym *sym;
> > +
> > +	if (!addr)
> > +		return NULL;
> > +
> > +	sym = kernel_syms_search(&dd, addr);
> > +	if (!sym && is_ibt_enabled && addr >= 4)
> > +		sym = kernel_syms_search(&dd, addr - 4);
> 
> When is_ibt_enabled is set, can addr ever be resolved by the first
> kernel_syms_search(&dd, addr) call, or does a match always require the
> addr - 4 adjustment?
> 
> If a match is only ever possible at addr - 4, would an if/else be clearer
> here than trying addr first and then falling back to addr - 4?

I see trace-able functions without endbr instruction at the entry
on kernel with IBT enabled, like:

	# cat available_filter_functions_addrs | grep get_next_root
	ffffffff81211a70 get_next_root
	# cat /proc/kallsyms | grep get_next_root
	ffffffff81211a70 t get_next_root

and having adjusted functions with endbr instruction as well:

	# cat available_filter_functions_addrs | grep ksys_read
	ffffffff816f6404 ksys_readahead
	ffffffff8182bf14 ksys_read
	# cat /proc/kallsyms | grep ksys_read
	ffffffff816f6400 T ksys_readahead
	ffffffff8182bf10 T ksys_read

so we need the check as is

jirka

  reply	other threads:[~2026-06-29 20:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 14:38 [PATCHv3 bpf-next 0/3] bpf: tracing_multi link info support Jiri Olsa
2026-06-29 14:38 ` [PATCHv3 bpf-next 1/3] bpf: Add " Jiri Olsa
2026-06-29 14:38 ` [PATCHv3 bpf-next 2/3] selftests/bpf: Add tracing_multi link info tests Jiri Olsa
2026-06-29 14:52   ` sashiko-bot
2026-06-29 14:38 ` [PATCHv3 bpf-next 3/3] bpftool: Add tracing_multi link info output Jiri Olsa
2026-06-29 14:53   ` sashiko-bot
2026-06-29 16:05   ` bot+bpf-ci
2026-06-29 20:51     ` Jiri Olsa [this message]
2026-06-29 17:28   ` Alexei Starovoitov
2026-06-29 20:02     ` 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=akLawCtmY4PkWDAO@krava \
    --to=olsajiri@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=clm@meta.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=qmo@kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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 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.