diff options
| author | Jonathan Edwards <[email protected]> | 2021-06-19 11:10:07 -0400 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2021-06-21 17:21:07 +0200 |
| commit | 5c10a3dbe9220ca7bcee716c13c8a8563bcb010a (patch) | |
| tree | 55801dbb8639b57a73528e17ca35f7a2eac24c70 /scripts/gcc-plugins/gcc-generate-rtl-pass.h | |
| parent | f42cfb469f9b4a1c002a03cce3d9329376800a6f (diff) | |
libbpf: Add extra BPF_PROG_TYPE check to bpf_object__probe_loading
eBPF has been backported for RHEL 7 w/ kernel 3.10-940+ [0]. However only
the following program types are supported [1]:
BPF_PROG_TYPE_KPROBE
BPF_PROG_TYPE_TRACEPOINT
BPF_PROG_TYPE_PERF_EVENT
For libbpf this causes an EINVAL return during the bpf_object__probe_loading
call which only checks to see if programs of type BPF_PROG_TYPE_SOCKET_FILTER
can load.
The following will try BPF_PROG_TYPE_TRACEPOINT as a fallback attempt before
erroring out. BPF_PROG_TYPE_KPROBE was not a good candidate because on some
kernels it requires knowledge of the LINUX_VERSION_CODE.
[0] https://www.redhat.com/en/blog/introduction-ebpf-red-hat-enterprise-linux-7
[1] https://access.redhat.com/articles/3550581
Signed-off-by: Jonathan Edwards <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/gcc-generate-rtl-pass.h')
0 files changed, 0 insertions, 0 deletions