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

0.6.1 fixes #123

Merged
merged 2 commits into from
Jan 26, 2022
Merged

0.6.1 fixes #123

merged 2 commits into from
Jan 26, 2022

Conversation

rafaeldtinoco
Copy link
Contributor

@rafaeldtinoco rafaeldtinoco commented Jan 25, 2022

commit d259d81
Author: Rafael David Tinoco rafaeldtinoco@gmail.com
Date: Tue Jan 25 16:36:22 2022

libbpfgo: use perf_buffer__new new API and fix style

Fix: #121

This commit forces libbpfgo.go C embedded source code function
init_perf_buf to use the new perf_buffer__new() API. This is needed to
make sure libbpf doesn't choose to execute compatible perf_buffer__new()
function prototype, causing execution issues (seg faults) in some
environments.

commit 1a666df
Author: Rafael David Tinoco rafaeldtinoco@gmail.com
Date: Tue Jan 25 12:14:30 2022

kprobe: remove legacy kprobes and unneeded includes

Fix: #34

Since libbpf commit 749b394 ("libbpf: Introduce legacy kprobe events
support"), and subsequent fixes and refactorings to this code, there is
no longer a need for libbpfgo to keep its own legacy kprobes code, as
libbpfgo is now at libbpf v0.6.1 and that logic was added since v0.6.0.

libbpfgo.go Outdated Show resolved Hide resolved
libbpfgo.go Show resolved Hide resolved
Fix: #34

Since libbpf commit 749b394 ("libbpf: Introduce legacy kprobe events
support"), and subsequent fixes and refactorings to this code, there is
no longer a need for libbpfgo to keep its own legacy kprobes code, as
libbpfgo is now at libbpf v0.6.1 and that logic was added since v0.6.0.
Fix: #121

This commit forces libbpfgo.go C embedded source code function
init_perf_buf to use the new perf_buffer__new() API. This is needed to
make sure libbpf doesn't choose to execute compatible perf_buffer__new()
function prototype, causing execution issues (seg faults) in some
environments.
@rafaeldtinoco rafaeldtinoco merged commit 5e89006 into aquasecurity:main Jan 26, 2022
@rafaeldtinoco rafaeldtinoco deleted the 0.6.1-fixes branch January 26, 2022 15:08
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

Successfully merging this pull request may close these issues.

panic when using perf buffer with libbpf v0.6.1 Remove kprobe legacy logic once upstream accepts it
2 participants