bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] btf_encoder: Detect kernel modules
@ 2020-11-24 16:19 Jiri Olsa
  2020-11-24 16:19 ` [PATCH 1/2] btf_encoder: Factor filter_functions function Jiri Olsa
  2020-11-24 16:19 ` [PATCH 2/2] btf_encoder: Detect kernel module ftrace addresses Jiri Olsa
  0 siblings, 2 replies; 8+ messages in thread
From: Jiri Olsa @ 2020-11-24 16:19 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: dwarves, bpf, Alexei Starovoitov, Andrii Nakryiko, Yonghong Song,
	Hao Luo

hi,
adding support to detect kernel module and use its
mcount_loc section data as function filter.

It's working on my setup, but I fear there might be
kernel configuration where it could fail.

I'm mostly worried about the assumption that there's
always relocation section '.rela__mcount_loc' for
'__mcount_loc' section in kernel modules.

And because the relocation changes addresses, we need
to be sure we compare relative or relocated addresses.

I still need to double check scripts/recordmcount.c
to be sure about that. 

Any testing feedback would be great.

thanks,
jirka


---
Jiri Olsa (2):
      btf_encoder: Factor filter_functions function
      btf_encoder: Detect kernel module ftrace addresses

 btf_encoder.c | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------
 dutil.c       |  16 ++++++++++++++++
 dutil.h       |   2 ++
 3 files changed, 137 insertions(+), 23 deletions(-)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-11-27 20:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 16:19 [RFC 0/2] btf_encoder: Detect kernel modules Jiri Olsa
2020-11-24 16:19 ` [PATCH 1/2] btf_encoder: Factor filter_functions function Jiri Olsa
2020-11-27  4:05   ` Andrii Nakryiko
2020-11-27 17:21     ` Jiri Olsa
2020-11-24 16:19 ` [PATCH 2/2] btf_encoder: Detect kernel module ftrace addresses Jiri Olsa
2020-11-27  4:18   ` Andrii Nakryiko
2020-11-27 17:40     ` Jiri Olsa
2020-11-27 20:39       ` Arnaldo Carvalho de Melo

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).