Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHEL 7 eBPF loading failure #320

Closed
jjedwa165 opened this issue Jun 8, 2021 · 3 comments
Closed

RHEL 7 eBPF loading failure #320

jjedwa165 opened this issue Jun 8, 2021 · 3 comments

Comments

@jjedwa165
Copy link
Contributor

eBPF has been backported for RHEL 7 w/ kernel 3.10-940+.

However only the following program types are supported

BPF_PROG_TYPE_KPROBE
BPF_PROG_TYPE_TRACEPOINT
BPF_PROG_TYPE_PERF_EVENT

For db9614b this causes an issue during the bpf_object__probe_loading call which checks to see if programs of type BPF_PROG_TYPE_SOCKET_FILTER can load.

Suggest changing this check to BPF_PROG_TYPE_TRACEPOINT

@jjedwa165 jjedwa165 changed the title RHEL 7 eBPF Tech Preview loading failure RHEL 7 eBPF loading failure Jun 8, 2021
@anakryiko
Copy link
Member

Yes, I'm aware of this problem, it came up before at least twice. The problem with doing TRACEPOINT or KPROBE (and I think we should stick to KPROBE, actually), is that some older kernels will support SOCKET_FILTER, but not TRACEPOINT/KPROBE. So I think the solution here would be to try SOCKET_FILTER, if that fails, try again KPROBE. If that succeeds, assume BPF subsystem is set up properly. WDYT? Would you be able to submit the patch for that (keep in mind it has to go through kernel mailing list, see README for more details).

@jjedwa165
Copy link
Contributor Author

ok, will do.

@jjedwa165
Copy link
Contributor Author

Sent. [PATCH] add multiple program checks to bpf_object__probe_loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants