summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-07-12 22:32:43 -0700
committerColin Cross <ccross@android.com>2011-07-12 22:32:43 -0700
commit5923f33ed7cf186ceac3541987efcc32beb29ab9 (patch)
tree6dcf111da908c0315fce2e7d9c1980646e22ddf8
parenteff788820689e7c2bfd456934e8132a381b31235 (diff)
downloadextras-5923f33ed7cf186ceac3541987efcc32beb29ab9.tar.gz
Ignore the vector page in /proc/<pid>/maps
In kernel 2.6.37, the vector page was added to /proc/<pid>/maps, but because it is located above TASK_SIZE (usually 0xbf000000), it is considered to be in the kernel's address space, not the process', so it doesn't show up in /proc/<pid>/pagemap. When the vector page is detected, using the name "[vectors]", remove it from the map. Change-Id: I5f0758bbe5d2b927056fa9fee684fea63dd0fa4b
-rw-r--r--libpagemap/pm_process.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpagemap/pm_process.c b/libpagemap/pm_process.c
index 1ab367d8..0f54b481 100644
--- a/libpagemap/pm_process.c
+++ b/libpagemap/pm_process.c
@@ -258,6 +258,9 @@ static int read_maps(pm_process_t *proc) {
sscanf(line, "%lx-%lx %s %lx %*s %*d %" S(MAX_LINE) "s",
&map->start, &map->end, perms, &map->offset, name);
+ if (!strcmp(name, "[vectors]"))
+ continue;
+
map->name = malloc(strlen(name) + 1);
if (!map->name) {
error = errno;