Skip to content

Comments

Temporarily fix the EADDRNOTAVAIL when loading#302

Merged
brb merged 2 commits intomainfrom
pr/brb/tmp-fix-eaddrnotavail
Dec 20, 2023
Merged

Temporarily fix the EADDRNOTAVAIL when loading#302
brb merged 2 commits intomainfrom
pr/brb/tmp-fix-eaddrnotavail

Conversation

@brb
Copy link
Member

@brb brb commented Dec 20, 2023

See commit msgs.

Related #284.

cc @Asphaltt

brb added 2 commits December 20, 2023 13:46
[1] changed the kprobe loading behavior in a way that if we try to
attach a kprobe to a function with a duplicate name, then it will fail
with EADDRNOTAVAIL [2].

As pwru loads kprobes by using function symbol names, we are prone to
this behavior change.

Fix the loading problem by ignoring EADDRNOTAVAIL w/ the kprobe backend.
Also, instruct users when the kprobe.multi backend is used.

The proper fix is to use function addrs instead of syms when loading.
This is what Leon H. is working on.

[1]: https://lore.kernel.org/all/[email protected]/.
[2]: https://elixir.bootlin.com/linux/v6.6/source/kernel/trace/trace_kprobe.c#L884

Signed-off-by: Leon Hwang <[email protected]>
Signed-off-by: Martynas Pumputis <[email protected]>
To fix the loading issue on the bpf-next kernel [1].

[1]: #284

Signed-off-by: Martynas Pumputis <[email protected]>
@brb brb added the bug Something isn't working label Dec 20, 2023
@brb brb marked this pull request as ready for review December 20, 2023 13:05
@brb brb requested a review from jschwinger233 December 20, 2023 13:05
@brb brb merged commit c3a9091 into main Dec 20, 2023
@brb brb deleted the pr/brb/tmp-fix-eaddrnotavail branch May 22, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants