Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ksnoop: use bpf_get_func_ip() where helper is available
bpf_get_func_ip(ctx) will get the function address; use it where available using the BPF core enum value check for the function. This avoids needing to get the caller IP via KSNOOP_IP_FIX() for more up-to-date kernels. This fixes issue iovisor#4746 for kernels newer than 5.13; an additional followup will be needed to address this for older kernels. Kindly tested by https://github.com/matthew-olson-intel on a recent kernel. Reported-by: dubeyabhishek (https://github.com/dubeyabhishek) Signed-off-by: Alan Maguire <[email protected]>
- Loading branch information