aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/ssvm.c1
-rw-r--r--src/svm/svm.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index 0305278a6b6..073bc0b5403 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -97,6 +97,7 @@ ssvm_master_init_shm (ssvm_private_t * ssvm)
close (ssvm_fd);
sh = mapa.addr;
+ CLIB_MEM_UNPOISON (sh, sizeof (*sh));
sh->master_pid = ssvm->my_pid;
sh->ssvm_size = ssvm->ssvm_size;
sh->ssvm_va = pointer_to_uword (sh);
diff --git a/src/svm/svm.c b/src/svm/svm.c
index 6249a342be2..20f4b7a6e7a 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -329,6 +329,7 @@ svm_data_region_create (svm_map_region_args_t * a, svm_region_t * rp)
return -3;
}
close (fd);
+ CLIB_MEM_UNPOISON (rp->data_base, map_size);
rp->backing_file = (char *) format (0, "%s\0", a->backing_file);
rp->flags |= SVM_FLAGS_FILE;
}
@@ -414,6 +415,7 @@ svm_data_region_map (svm_map_region_args_t * a, svm_region_t * rp)
return -3;
}
close (fd);
+ CLIB_MEM_UNPOISON (rp->data_base, map_size);
}
return 0;
}
@@ -607,6 +609,7 @@ svm_map_region (svm_map_region_args_t * a)
return (0);
}
close (svm_fd);
+ CLIB_MEM_UNPOISON (rp, a->size);
svm_region_init_mapped_region (a, rp);
@@ -663,6 +666,9 @@ svm_map_region (svm_map_region_args_t * a)
clib_warning ("mmap");
return (0);
}
+
+ CLIB_MEM_UNPOISON (rp, MMAP_PAGESIZE);
+
/*
* We lost the footrace to create this region; make sure
* the winner has crossed the finish line.
@@ -699,6 +705,8 @@ svm_map_region (svm_map_region_args_t * a)
close (svm_fd);
+ CLIB_MEM_UNPOISON (rp, a->size);
+
if ((uword) rp != rp->virtual_base)
{
clib_warning ("mmap botch");
@@ -1042,6 +1050,7 @@ svm_region_unmap_internal (void *rp_arg, u8 is_client)
oldheap = svm_push_pvt_heap (rp); /* nb vec_delete() in the loop */
/* Remove the caller from the list of mappers */
+ CLIB_MEM_UNPOISON (rp->client_pids, vec_bytes (rp->client_pids));
for (i = 0; i < vec_len (rp->client_pids); i++)
{
if (rp->client_pids[i] == mypid)
@@ -1174,6 +1183,7 @@ svm_region_exit_internal (u8 is_client)
virtual_base = root_rp->virtual_base;
virtual_size = root_rp->virtual_size;
+ CLIB_MEM_UNPOISON (root_rp->client_pids, vec_bytes (root_rp->client_pids));
for (i = 0; i < vec_len (root_rp->client_pids); i++)
{
if (root_rp->client_pids[i] == mypid)