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

Improve linux process scan using pagemap #96

Merged
merged 7 commits into from
Dec 15, 2023
Merged

Conversation

vthib
Copy link
Owner

@vthib vthib commented Dec 14, 2023

Read memory from the file backing the region if possible, reading from proc mem when the page has been modified by the process.

@vthib vthib force-pushed the improve-linux-process-scan branch 3 times, most recently from 284da2a to f26ab77 Compare December 15, 2023 00:15
Unfortunately this brings an additional dependency, but a very
common one.
This prevents all sorts of issues in the fetch algorithm. Since those
parameters will never sensibly be set anywhere near the page size,
this rounding should never be felt by any user.

This requires changes in tests because:
- one test used a very small value for one of the param
- another test changed a param on half a page boundary

4MB is used for the page size, which should always work when running
those tests.
The chunking was not correctly applied to the length field, leading to
the last chunk failing to read.
The length was not correctly adjusted, although whether that caused
bugs is unclear.
@vthib vthib force-pushed the improve-linux-process-scan branch from f26ab77 to 2e86db7 Compare December 15, 2023 00:19
@vthib vthib merged commit c5c477d into master Dec 15, 2023
9 checks passed
@vthib vthib deleted the improve-linux-process-scan branch December 15, 2023 00:39
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.

1 participant