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

aya-ebpf: ProbeContext: rewrite the implement of FromPtRegs trait. #944

Closed
wants to merge 1 commit into from

Conversation

WindySha
Copy link

@WindySha WindySha commented May 14, 2024

The original implementation of the trait is unable to correctly retrieve the arguments of a function, necessitating a rewrite. This includes two interfaces: from_argument and from_retval.

To access a function's argument, it is necessary to accurately identify the register address where the argument is stored. Subsequently, we can use the function to read
the contents at this register address.
This allows us to correctly retrieve the argument of the function.

Fixes: #587

The original implementation of the  trait is unable to
correctly retrieve the arguments of a function, necessitating a rewrite.
This includes two interfaces:  and .

To access a function's argument, it is necessary to accurately
identify the register address where the argument is stored.
Subsequently, we can use the  function to read
the contents at this register address.
This allows us to correctly retrieve the argument of the function.

Fixes: aya-rs#587
Copy link

netlify bot commented May 14, 2024

Deploy Preview for aya-rs-docs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a1df0d2
🔍 Latest deploy log https://app.netlify.com/sites/aya-rs-docs/deploys/66430d44b6a6b80007f4f6d8
😎 Deploy Preview https://deploy-preview-944--aya-rs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mergify mergify bot added the aya-bpf This is about aya-bpf (kernel) label May 14, 2024
@WindySha
Copy link
Author

Why did the CI flow failed? I need some help.

---- tests::ring_buf::ring_buf::write_half_the_capacity_items stdout ----
thread 'tests::ring_buf::ring_buf::write_half_the_capacity_items' panicked at test/integration-test/src/tests/ring_buf.rs:83:21:
called Result::unwrap() on an Err value: LoadError { io_error: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }, verifier_log: 0: R1=ctx(off=0,imm=0) R10=fp0

@Ablu
Copy link

Ablu commented May 25, 2024

This includes two interfaces: and .

This reads like there should be the interfaces spelled out? :)

@WindySha
Copy link
Author

This includes two interfaces: and .

This reads like there should be the interfaces spelled out? :)

Thank you. I have modified the words to : "This includes two interfaces: from_argument and from_retval."

@WindySha WindySha closed this Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aya-bpf This is about aya-bpf (kernel)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kprobe attach __x64_sys_open get empty file from arg 0
2 participants