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

Fix virtual to binary addr conversion for processes that have an uncommon virtual memory mapping #1637

Merged

Conversation

ddelnano
Copy link
Member

@ddelnano ddelnano commented Jul 26, 2023

Summary: Fix virtual to binary addr conversion for processes that have an uncommon virtual memory mapping

Our previous virtual to binary address conversion logic assumed that the first offset within /proc/$PID/maps was the correct offset to apply for PIE binaries. There are certain cases, such as when an unlimited stack ulimit is applied, where this assumption doesn't hold true (see the linked issue before for more details). This change adjusts our conversion logic to take into account the correct /proc/$PID/maps entry so address conversion works in all known cases.

Relevant Issues: #1630

Type of change: /kind bug

Test Plan: Verified the following:

have an uncommon virtual memory mapping.

Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
@ddelnano ddelnano requested a review from a team as a code owner July 26, 2023 21:18
@ddelnano ddelnano requested a review from a team July 26, 2023 21:18
@ddelnano ddelnano marked this pull request as draft July 26, 2023 21:32
ddelnano added 2 commits July 26, 2023 21:47
Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
…r logic to a dedicated function

Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
…ntry and remove unused function

Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
@ddelnano ddelnano force-pushed the ddelnano/fix-self-uprobe-attachment-crash branch from 67adcd6 to 6a20f05 Compare August 1, 2023 17:12
@ddelnano ddelnano marked this pull request as ready for review August 1, 2023 17:26
@ddelnano
Copy link
Member Author

ddelnano commented Aug 1, 2023

@pixie-io/maintainers this is ready for review now.

@vihangm vihangm merged commit 5e4a581 into pixie-io:main Aug 1, 2023
@ddelnano ddelnano deleted the ddelnano/fix-self-uprobe-attachment-crash branch August 2, 2024 13:23
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.

3 participants