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

[Question] The type of uprobe does not match kernel #313

Open
janetat opened this issue Jul 25, 2024 · 4 comments
Open

[Question] The type of uprobe does not match kernel #313

janetat opened this issue Jul 25, 2024 · 4 comments

Comments

@janetat
Copy link

janetat commented Jul 25, 2024

问题

当劫持的是BPF_PROG_LOAD时,为什么uprobe/uretprobe -> BPF_PROG_TYPE_SOCKET_FILTER?

假如使用的是bpf_prog_attach_uprobe_with_override去挂载程序(error_inject.c)。

@Officeyutong

This comment was marked as outdated.

@janetat
Copy link
Author

janetat commented Jul 25, 2024

But link says uprobe/uretprobe program is BPF_PROG_TYPE_KPROBE

@janetat
Copy link
Author

janetat commented Jul 25, 2024

BTW, After error_inject_bpf__open(), I print out the program type:

    # The bpf_prog_type is 2, BPF_PROG_TYPE_KPROBE
    fprintf(stderr, "!!!!!1: %d\n", skel->progs.do_error_inject_patch->type);
    fprintf(stderr, "!!!!!2: %s\n", skel->progs.do_error_inject_patch->name);

@yunwei37 yunwei37 changed the title 关于handle_sysbpf的疑问 [Question] The type of uprobe does not match kernel Aug 9, 2024
@yunwei37
Copy link
Member

yunwei37 commented Aug 9, 2024

The key problem is that bpf_prog_attach_uprobe_with_override is not supported by kernel.

It's a self-define type only in bpftime, so we choose a type for that. Maybe we should choose a new one....

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

3 participants