summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
07bbaef)
- restrict the unittests SVM address space to what is supported by ASan
- mark SVM mmap()ed address space accessible for ASan
- SVM shared memory heap scheme means some allocation can happen
outside the current process. Lazily mark those accessible for ASan
Type: fix
Change-Id: I7c196c80b2a5297651d0afa54f1a8e478fcf59b1
Signed-off-by: Benoît Ganne <bganne@cisco.com>
- clib_warning ("high mem %lu", HIGH_SEGMENT_BASEVA << 4);
- fifo_segment_main_init (&segment_main, HIGH_SEGMENT_BASEVA << 4, 5);
+ clib_warning ("high mem %lu", HIGH_SEGMENT_BASEVA << 1);
+ fifo_segment_main_init (&segment_main, HIGH_SEGMENT_BASEVA << 1, 5);
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "fifo1"))
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "fifo1"))
close (ssvm_fd);
sh = mapa.addr;
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);
sh->master_pid = ssvm->my_pid;
sh->ssvm_size = ssvm->ssvm_size;
sh->ssvm_va = pointer_to_uword (sh);
+ CLIB_MEM_UNPOISON (rp->data_base, map_size);
rp->backing_file = (char *) format (0, "%s\0", a->backing_file);
rp->flags |= SVM_FLAGS_FILE;
}
rp->backing_file = (char *) format (0, "%s\0", a->backing_file);
rp->flags |= SVM_FLAGS_FILE;
}
+ CLIB_MEM_UNPOISON (rp->data_base, map_size);
return (0);
}
close (svm_fd);
return (0);
}
close (svm_fd);
+ CLIB_MEM_UNPOISON (rp, a->size);
svm_region_init_mapped_region (a, rp);
svm_region_init_mapped_region (a, rp);
clib_warning ("mmap");
return (0);
}
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.
/*
* We lost the footrace to create this region; make sure
* the winner has crossed the finish line.
+ CLIB_MEM_UNPOISON (rp, a->size);
+
if ((uword) rp != rp->virtual_base)
{
clib_warning ("mmap botch");
if ((uword) rp != rp->virtual_base)
{
clib_warning ("mmap botch");
oldheap = svm_push_pvt_heap (rp); /* nb vec_delete() in the loop */
/* Remove the caller from the list of mappers */
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)
for (i = 0; i < vec_len (rp->client_pids); i++)
{
if (rp->client_pids[i] == mypid)
virtual_base = root_rp->virtual_base;
virtual_size = root_rp->virtual_size;
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)
for (i = 0; i < vec_len (root_rp->client_pids); i++)
{
if (root_rp->client_pids[i] == mypid)