From 5923f33ed7cf186ceac3541987efcc32beb29ab9 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 12 Jul 2011 22:32:43 -0700 Subject: [PATCH] Ignore the vector page in /proc//maps In kernel 2.6.37, the vector page was added to /proc//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//pagemap. When the vector page is detected, using the name "[vectors]", remove it from the map. Change-Id: I5f0758bbe5d2b927056fa9fee684fea63dd0fa4b --- libpagemap/pm_process.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.11.0