summaryrefslogtreecommitdiff
path: root/libpagemap/pm_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpagemap/pm_process.c')
-rw-r--r--libpagemap/pm_process.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libpagemap/pm_process.c b/libpagemap/pm_process.c
index 0f54b481..b3c077ee 100644
--- a/libpagemap/pm_process.c
+++ b/libpagemap/pm_process.c
@@ -116,7 +116,13 @@ int pm_process_pagemap_range(pm_process_t *proc,
return error;
}
error = read(proc->pagemap_fd, (char*)range, numpages * sizeof(uint64_t));
- if (error < numpages * sizeof(uint64_t)) {
+ if (error == 0) {
+ /* EOF, mapping is not in userspace mapping range (probably vectors) */
+ *len = 0;
+ free(range);
+ *range_out = NULL;
+ return 0;
+ } else if (error < 0 || (error > 0 && error < numpages * sizeof(uint64_t))) {
error = (error < 0) ? errno : -1;
free(range);
return error;
@@ -258,9 +264,6 @@ 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;