On 11/13/20 6:34 AM, carlos antonio neira bustos wrote:
Hi Blaise and Daniel,
I was following a couple of months ago how bpftrace was going to handle
this situation. I thought this PR
https://github.com/iovisor/bpftrace/pull/1602
<https://github.com/iovisor/bpftrace/pull/1602> was going to be merged
but just found today that is not working.
I agree with Yonghong Song on the approach of using the two helpers
(bpf_get_pid_tgid() and bpf_get_ns_current_pid_tgid()) to move forward
on the short term, bpf_get_ns_current_pid_tgid works as a replacement
to bpf_get_pid_tgid when you are instrumenting inside a container.
But the use case described by Blaise is one I would like to use bpftrace,
If nobody is against it, I could start working on a new helper to
address that situation as I need to have bpftrace working in that scenario.
Yes, please. Thanks!
For my understanding of the problem the new helper should be able to
return pid/tgid from a target namespace, is that correct?.
Yes. This way, the stack trace can correlate to target namespace for
symbolization purpose.
Bests
[...]