Skip to content

Latest commit

 

History

History

procmapquery

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

PROCMAP_QUERY

The /proc/*/maps files list the virtual memory areas (VMAs) of a process and what, if anything, they are mapped to. A process typically has its own program executable and the libraries it needs mapped in, as well as VMAs for storing data, including the stack and the heap. If you read this file in the ordinary way, you get a sequential list of all VMAs in a text format.

The PROCMAP_QUERY ioctl operation, added in kernel 6.11, lets you query for a specific VMA in various ways and get the response back as structured data.

The file procmapquery.py implements a get_libraries() function that takes an open /proc/*/maps file and returns a set of mapped files. There is a brief main block, so you can run it with python3 procmapquery.py.