vppinfra: refactor address sanitizer

Type: refactor
Change-Id: I5ca142ec1557d5b5c3806b43553ad9d3b5ea1112
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c
index 77177a1..489ca2a 100644
--- a/src/svm/fifo_segment.c
+++ b/src/svm/fifo_segment.c
@@ -312,7 +312,7 @@
 
   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 @@
 
   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 e404906..9cdde12 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -95,7 +95,7 @@
 
   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 b844e20..0a91055 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -327,7 +327,7 @@
 	  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 @@
 	  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 @@
 	  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 @@
 	  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 @@
 
       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 @@
   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 @@
   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 83cad42..49b3d17 100644
--- a/src/svm/svm_fifo.c
+++ b/src/svm/svm_fifo.c
@@ -72,8 +72,8 @@
       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 @@
   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);