Unverified Commit 3a932466 authored by yonghong-song's avatar yonghong-song Committed by GitHub
Browse files

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: default avatarYonghong Song <yhs@fb.com>
parent 5aadf2ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment