Skip to content

bpf_probe_read not work #3009

@woodliu

Description

@woodliu

My Env is :Linux kernal 5.7.7, centos 7.6 operation system
I run this program , and i got this error :
HINT: The invalid mem access 'inv' error can happen if you try to dereference memory without first using bpf_probe_read_kernel() to copy it to the BPF stack. Sometimes the bpf_probe_read_kernel() is automatic by the bcc rewriter, other times you'll need to be explicit..
And when i change the bpf_probe_read to bpf_probe_read_kernel it works.
What is the difference between bpf_probe_read_kernel and bpf_probe_read, i am confused.
I noticed this issue 2986, it seems be reverted back to bpf_probe_read. But when i should choice which one to use?
Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions