-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Store inode when reading /proc/*/smaps in _pslinux.py/get_memory_maps() #444
Comments
From g.rodola on November 20, 2013 03:23:27
|
From remi.cha...@gmail.com on November 20, 2013 03:48:44
|
From g.rodola on November 20, 2013 10:31:07
|
From remi.cha...@gmail.com on November 20, 2013 12:50:54
|
Is this still on track? I'm developing a tool that track processes that are running with outdated mmap'ed libraries (containing bugs or security issues or even a malware infected file using this to hide). /proc/pid/smap flags them with appending " (deleted)" at the end of the path. psutil does not allow to get the inode which would but required to validate the mmap'ed file is different from the file on the filesystem. psutil also strips the " (deleted)". Therefore I see no way of getting the info for my case. like remi mentioned in the first comment the patch seems trivial:
I don't know about other OS, however as I can see in the doc, the info is already very different depending on the OS: |
Yes, info is different depending on the OS, but all the values that differ are integers that are summed together when using |
For my case it would be ok to be excluded from grouped=True. It's probably realistically unlikely, but the same path may be loaded with different inodes, so using grouped=False may even be required. Once i have the inode, I can "stat" the file in the filesytem and compare if the inodes are the same. If the mmap'ed path is delted in the filesystem, the logic gets a bit more complicated to remove false positive (basically if the file is a shared library, I can check if a newer version is present in the filesystem). |
From remi.cha...@gmail.com on November 20, 2013 12:12:24
Original issue: http://code.google.com/p/psutil/issues/detail?id=444
The text was updated successfully, but these errors were encountered: