aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-04-05 12:40:31 +0200
committerBeno�t Ganne <bganne@cisco.com>2022-04-05 14:46:15 +0000
commit79934e855fc58aefde498cd0564796cdd6ccbc59 (patch)
treedb3c5a33e1146915572160c33f2a0a8c9cbd18cd /src/svm
parent0c740a6d8a6c11b1af4ce704220c2c46628f0a89 (diff)
vppinfra: refactor address sanitizer
Type: refactor Change-Id: I5ca142ec1557d5b5c3806b43553ad9d3b5ea1112 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/fifo_segment.c4
-rw-r--r--src/svm/ssvm.c2
-rw-r--r--src/svm/svm.c14
-rw-r--r--src/svm/svm_fifo.c6
4 files changed, 13 insertions, 13 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c
index 77177a14a69..489ca2a4929 100644
--- a/src/svm/fifo_segment.c
+++ b/src/svm/fifo_segment.c
@@ -312,7 +312,7 @@ fifo_segment_init (fifo_segment_t * fs)
seg_start = round_pow2_u64 (pointer_to_uword (seg_data), align);
fsh = uword_to_pointer (seg_start, void *);
- CLIB_MEM_UNPOISON (fsh, seg_sz);
+ clib_mem_unpoison (fsh, seg_sz);
memset (fsh, 0, sizeof (*fsh) + slices_sz);
fsh->byte_index = sizeof (*fsh) + slices_sz;
@@ -781,7 +781,7 @@ fsh_slice_collect_chunks (fifo_segment_header_t * fsh,
while (c)
{
- CLIB_MEM_UNPOISON (c, sizeof (*c));
+ clib_mem_unpoison (c, sizeof (*c));
next = fs_chunk_ptr (fsh, c->next);
fl_index = fs_freelist_for_size (c->length);
fss_chunk_free_list_push (fsh, fss, fl_index, c);
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index e404906cb29..9cdde128561 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -95,7 +95,7 @@ ssvm_server_init_shm (ssvm_private_t * ssvm)
close (ssvm_fd);
- CLIB_MEM_UNPOISON (sh, sizeof (*sh));
+ clib_mem_unpoison (sh, sizeof (*sh));
sh->server_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 b844e20b4cc..0a910558f6e 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -327,7 +327,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);
+ clib_mem_unpoison (rp->data_base, map_size);
rp->backing_file = (char *) format (0, "%s%c", a->backing_file, 0);
rp->flags |= SVM_FLAGS_FILE;
}
@@ -412,7 +412,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);
+ clib_mem_unpoison (rp->data_base, map_size);
}
return 0;
}
@@ -605,7 +605,7 @@ svm_map_region (svm_map_region_args_t * a)
return (0);
}
close (svm_fd);
- CLIB_MEM_UNPOISON (rp, a->size);
+ clib_mem_unpoison (rp, a->size);
svm_region_init_mapped_region (a, rp);
@@ -663,7 +663,7 @@ svm_map_region (svm_map_region_args_t * a)
return (0);
}
- CLIB_MEM_UNPOISON (rp, MMAP_PAGESIZE);
+ clib_mem_unpoison (rp, MMAP_PAGESIZE);
/*
* We lost the footrace to create this region; make sure
@@ -701,7 +701,7 @@ svm_map_region (svm_map_region_args_t * a)
close (svm_fd);
- CLIB_MEM_UNPOISON (rp, a->size);
+ clib_mem_unpoison (rp, a->size);
if ((uword) rp != rp->virtual_base)
{
@@ -1051,7 +1051,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));
+ 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)
@@ -1184,7 +1184,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));
+ 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)
diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c
index 83cad42ee9b..49b3d1728f3 100644
--- a/src/svm/svm_fifo.c
+++ b/src/svm/svm_fifo.c
@@ -72,8 +72,8 @@ CLIB_MARCH_FN (svm_fifo_copy_from_chunk, void, svm_fifo_t *f,
c = f_cptr (f, c->next);
while ((to_copy -= n_chunk))
{
- CLIB_MEM_UNPOISON (c, sizeof (*c));
- CLIB_MEM_UNPOISON (c->data, c->length);
+ clib_mem_unpoison (c, sizeof (*c));
+ clib_mem_unpoison (c->data, c->length);
n_chunk = clib_min (c->length, to_copy);
clib_memcpy_fast (dst + (len - to_copy), &c->data[0], n_chunk);
c = c->length <= to_copy ? f_cptr (f, c->next) : c;
@@ -1155,7 +1155,7 @@ svm_fifo_peek (svm_fifo_t * f, u32 offset, u32 len, u8 * dst)
len = clib_min (cursize - offset, len);
head_idx = head + offset;
- CLIB_MEM_UNPOISON (f->ooo_deq, sizeof (*f->ooo_deq));
+ clib_mem_unpoison (f->ooo_deq, sizeof (*f->ooo_deq));
if (!f->ooo_deq || !f_chunk_includes_pos (f->ooo_deq, head_idx))
f_update_ooo_deq (f, head_idx, head_idx + len);