From: Jiri Olsa <olsajiri@gmail.com>
To: Yonghong Song <yonghong.song@linux.dev>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>, Song Liu <song@kernel.org>,
Quentin Monnet <quentin@isovalent.com>,
bpf@vger.kernel.org, Martin KaFai Lau <kafai@fb.com>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Yafang Shao <laoar.shao@gmail.com>
Subject: Re: [PATCHv3 bpf-next 6/6] bpftool: Add support to display uprobe_multi links
Date: Tue, 21 Nov 2023 12:35:12 +0100 [thread overview]
Message-ID: <ZVyV8JW29oXAKAlR@krava> (raw)
In-Reply-To: <769b00a5-88ac-4902-a69e-01ec977338ee@linux.dev>
On Mon, Nov 20, 2023 at 10:32:02AM -0800, Yonghong Song wrote:
SNIP
> > +static void show_uprobe_multi_plain(struct bpf_link_info *info)
> > +{
> > + __u32 i;
> > +
> > + if (!info->uprobe_multi.count)
> > + return;
> > +
> > + if (info->uprobe_multi.flags & BPF_F_UPROBE_MULTI_RETURN)
> > + printf("\n\turetprobe.multi ");
> > + else
> > + printf("\n\tuprobe.multi ");
> > +
> > + printf("path %s ", (char *) u64_to_ptr(info->uprobe_multi.path));
> > + printf("func_cnt %u ", info->uprobe_multi.count);
> > +
> > + if (info->uprobe_multi.pid != (__u32) -1)
> > + printf("pid %d ", info->uprobe_multi.pid);
>
> Could you explain when info->uprobe_multi.pid could be -1?
> From patch 3, I see:
> info->uprobe_multi.pid = umulti_link->task ?
> task_pid_nr_ns(umulti_link->task, task_active_pid_ns(current)) : 0;
> and cannot find how -1 could be assigned to info->uprobe_multi.pid.
ah it's leftover from previous version fix.. and I forgot to update
the bpftool code.. nice catch, thanks
jirka
>
> > +
> > + printf("\n\t%-16s %-16s %-16s", "offset", "ref_ctr_offset", "cookies");
> > + for (i = 0; i < info->uprobe_multi.count; i++) {
> > + printf("\n\t0x%-16llx 0x%-16llx 0x%-16llx",
> > + u64_to_arr(info->uprobe_multi.offsets)[i],
> > + u64_to_arr(info->uprobe_multi.ref_ctr_offsets)[i],
> > + u64_to_arr(info->uprobe_multi.cookies)[i]);
> > + }
> > +}
> > +
> > static void show_perf_event_kprobe_plain(struct bpf_link_info *info)
> > {
> > const char *buf;
> > [...]
prev parent reply other threads:[~2023-11-21 11:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 14:56 [PATCHv3 bpf-next 0/6] bpf: Add link_info support for uprobe multi link Jiri Olsa
2023-11-20 14:56 ` [PATCHv3 bpf-next 1/6] libbpf: Add st_type argument to elf_resolve_syms_offsets function Jiri Olsa
2023-11-20 14:56 ` [PATCHv3 bpf-next 2/6] bpf: Store ref_ctr_offsets values in bpf_uprobe array Jiri Olsa
2023-11-20 14:56 ` [PATCHv3 bpf-next 3/6] bpf: Add link_info support for uprobe multi link Jiri Olsa
2023-11-20 18:04 ` Yonghong Song
2023-11-22 21:50 ` Jiri Olsa
2023-11-23 9:20 ` Jiri Olsa
2023-11-23 18:26 ` Yonghong Song
2023-11-21 18:41 ` Andrii Nakryiko
2023-11-22 13:48 ` Jiri Olsa
2023-11-20 14:56 ` [PATCHv3 bpf-next 4/6] selftests/bpf: Use bpf_link__destroy in fill_link_info tests Jiri Olsa
2023-11-20 18:06 ` Yonghong Song
2023-11-20 14:56 ` [PATCHv3 bpf-next 5/6] selftests/bpf: Add link_info test for uprobe_multi link Jiri Olsa
2023-11-20 18:22 ` Yonghong Song
2023-11-21 11:29 ` Jiri Olsa
2023-11-20 14:56 ` [PATCHv3 bpf-next 6/6] bpftool: Add support to display uprobe_multi links Jiri Olsa
2023-11-20 18:32 ` Yonghong Song
2023-11-21 11:35 ` Jiri Olsa [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=ZVyV8JW29oXAKAlR@krava \
--to=olsajiri@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=laoar.shao@gmail.com \
--cc=quentin@isovalent.com \
--cc=sdf@google.com \
--cc=song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox