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

kprobe: attach kprobe / kretprobe based on the SectionName #1508

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ghostbaby
Copy link
Contributor

@Ghostbaby Ghostbaby commented Jul 10, 2024

fixed #1497

Signed-off-by: zhuhuijun zhuhuijunzhj@gmail.com
@ti-mo
Copy link
Collaborator

ti-mo commented Aug 6, 2024

Hi, sorry for the slow response.

I'm a little confused by this patch. What problem does it solve? You've added some code that relies on ProgramInfo.Name (which gets truncated to 20 characters), but I'm not sure why. May I assume you want to 'fix' the issue by documenting it as an example?

I think the library can do more to be more helpful, but on the other hand, this all feels like a bit of a non-issue to me. There's nothing that semantically differentiates a kprobe from a kretprobe program, so trying to prevent the user from attaching something to the 'wrong' hook feels a bit counterproductive.

@lmb WDYT as you initially created the issue. Do you have more context about the situation this popped up in?

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.

program: make it harder to attach Kretprobe via link.Kprobe and vice versa
2 participants