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

[Feature] Fix the unaligned memory accesses for upload_socket_data_buf in skywalking-rover #12830

Open
3 tasks done
tsint opened this issue Dec 5, 2024 · 0 comments
Open
3 tasks done
Assignees
Labels
agent Language agent related. feature New feature Rover eBPF agent

Comments

@tsint
Copy link

tsint commented Dec 5, 2024

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

As mentioned in this article (https://docs.kernel.org/core-api/unaligned-memory-access.html), unaligned memory access can be costly even if it doesn't cause an exception or crash. The BPF code here (https://github.com/apache/skywalking-rover/blob/main/bpf/include/socket_data.h#L131-L132), when the buffer length exceeds 2047, gets truncated and then read and copied multiple times. Moreover, the subsequent reads and copies clearly have unaligned addresses.

Use case

No response

Related issues

No response

Are you willing to submit a pull request to implement this on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent Language agent related. feature New feature Rover eBPF agent
Projects
None yet
Development

No branches or pull requests

2 participants