diff options
author | Damjan Marion <damarion@cisco.com> | 2022-04-05 12:40:31 +0200 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2022-04-05 14:46:15 +0000 |
commit | 79934e855fc58aefde498cd0564796cdd6ccbc59 (patch) | |
tree | db3c5a33e1146915572160c33f2a0a8c9cbd18cd /src/vlibmemory | |
parent | 0c740a6d8a6c11b1af4ce704220c2c46628f0a89 (diff) |
vppinfra: refactor address sanitizer
Type: refactor
Change-Id: I5ca142ec1557d5b5c3806b43553ad9d3b5ea1112
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlibmemory')
-rw-r--r-- | src/vlibmemory/memory_client.c | 6 | ||||
-rw-r--r-- | src/vlibmemory/memory_shared.c | 4 | ||||
-rw-r--r-- | src/vlibmemory/socket_api.c | 2 | ||||
-rw-r--r-- | src/vlibmemory/vlib_api_cli.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/vlibmemory/memory_client.c b/src/vlibmemory/memory_client.c index 54bc8d8f859..585fca67998 100644 --- a/src/vlibmemory/memory_client.c +++ b/src/vlibmemory/memory_client.c @@ -114,11 +114,11 @@ vl_api_name_and_crc_free (void) hash_free (am->msg_index_by_name_and_crc); } -CLIB_NOSANITIZE_ADDR static void +__clib_nosanitize_addr static void VL_API_VEC_UNPOISON (const void *v) { const vec_header_t *vh = &((vec_header_t *) v)[-1]; - CLIB_MEM_UNPOISON (vh, sizeof (*vh) + vec_len (v)); + clib_mem_unpoison (vh, sizeof (*vh) + vec_len (v)); } static void @@ -192,7 +192,7 @@ vl_client_connect (const char *name, int ctx_quota, int input_queue_size) return -1; } - CLIB_MEM_UNPOISON (shmem_hdr, sizeof (*shmem_hdr)); + clib_mem_unpoison (shmem_hdr, sizeof (*shmem_hdr)); VL_MSG_API_SVM_QUEUE_UNPOISON (shmem_hdr->vl_input_queue); oldheap = vl_msg_push_heap (); diff --git a/src/vlibmemory/memory_shared.c b/src/vlibmemory/memory_shared.c index 5244b27ad37..b70f45fae14 100644 --- a/src/vlibmemory/memory_shared.c +++ b/src/vlibmemory/memory_shared.c @@ -43,8 +43,8 @@ #define DEBUG_MESSAGE_BUFFER_OVERRUN 0 -CLIB_NOSANITIZE_ADDR static inline void * -vl_msg_api_alloc_internal (svm_region_t * vlib_rp, int nbytes, int pool, +__clib_nosanitize_addr static inline void * +vl_msg_api_alloc_internal (svm_region_t *vlib_rp, int nbytes, int pool, int may_return_null) { int i; diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c index 9f9773ead1d..3df182b68b6 100644 --- a/src/vlibmemory/socket_api.c +++ b/src/vlibmemory/socket_api.c @@ -697,7 +697,7 @@ vl_api_sock_init_shm_t_handler (vl_api_sock_init_shm_t * mp) /* delete the unused heap created in ssvm_server_init_memfd and mark it * accessible again for ASAN */ clib_mem_destroy_heap (memfd->sh->heap); - CLIB_MEM_UNPOISON ((void *) memfd->sh->ssvm_va, memfd->ssvm_size); + clib_mem_unpoison ((void *) memfd->sh->ssvm_va, memfd->ssvm_size); /* Remember to close this fd when the socket connection goes away */ vec_add1 (regp->additional_fds_to_close, memfd->fd); diff --git a/src/vlibmemory/vlib_api_cli.c b/src/vlibmemory/vlib_api_cli.c index 732ced7634c..bdbedec009b 100644 --- a/src/vlibmemory/vlib_api_cli.c +++ b/src/vlibmemory/vlib_api_cli.c @@ -435,7 +435,7 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename, } close (fd); - CLIB_MEM_UNPOISON (hp, file_size); + clib_mem_unpoison (hp, file_size); nitems = ntohl (hp->nitems); |