fix attach_kretprobe for newer kernels (#1922)
fix #1921
For newer kernels, bcc tries to fd based kuprobe
attachment. In fd based kprobe attachment,
config1: for symbol
config2: for symbol offset
In python API attach_kretprobe, the offset value
is not set in lib.bpf_attach_kprobe and hence it
will be a random value and eventually causing
kretprobe attachment failure.
This is not an issue for old debugfs based attachment
as the offset will not be used if it is a retprobe.
Signed-off-by: Yonghong Song <yhs@fb.com>
Showing
Please register or sign in to comment