From 236182b040ff7e8f41c42325610599724ba75680 Mon Sep 17 00:00:00 2001 From: Delaram Amiri <108862804+delaramamiri@users.noreply.github.com> Date: Tue, 13 Dec 2022 16:06:01 -0800 Subject: [PATCH] platform library are missing SAL annotation (#1742) * enable app verifier for cicd build * SAL annotations * changed yml file * change _In_ to _Inout_ * update doxygen * Update libs/platform/user/ebpf_handle_user.c Co-authored-by: Dave Thaler * Update libs/platform/kernel/ebpf_handle_kernel.c Co-authored-by: Dave Thaler Co-authored-by: Dave Thaler --- libs/platform/ebpf_handle.h | 4 ++-- libs/platform/kernel/ebpf_handle_kernel.c | 2 +- libs/platform/user/ebpf_handle_user.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/platform/ebpf_handle.h b/libs/platform/ebpf_handle.h index cb2ef54ff..2027130ef 100644 --- a/libs/platform/ebpf_handle.h +++ b/libs/platform/ebpf_handle.h @@ -32,13 +32,13 @@ extern "C" * @brief Create a handle that holds a reference on the object. * * @param[out] handle Pointer to memory that contains the handle on success. - * @param[in] object Object to be referenced by this handle. + * @param[in,out] object Object to write to. * @retval EBPF_SUCCESS The operation was successful. * @retval EBPF_NO_MEMORY Unable to allocate resources for this * operation. */ _Must_inspect_result_ ebpf_result_t - ebpf_handle_create(ebpf_handle_t* handle, struct _ebpf_base_object* object); + ebpf_handle_create(_Out_ ebpf_handle_t* handle, _Inout_ struct _ebpf_base_object* object); /** * @brief Remove an existing handle from the handle table and release its diff --git a/libs/platform/kernel/ebpf_handle_kernel.c b/libs/platform/kernel/ebpf_handle_kernel.c index ff53b28d2..e6f796417 100644 --- a/libs/platform/kernel/ebpf_handle_kernel.c +++ b/libs/platform/kernel/ebpf_handle_kernel.c @@ -18,7 +18,7 @@ ebpf_handle_table_terminate() {} _Must_inspect_result_ ebpf_result_t -ebpf_handle_create(ebpf_handle_t* handle, ebpf_base_object_t* object) +ebpf_handle_create(_Out_ ebpf_handle_t* handle, _Inout_ ebpf_base_object_t* object) { EBPF_LOG_ENTRY(); ebpf_result_t return_value; diff --git a/libs/platform/user/ebpf_handle_user.c b/libs/platform/user/ebpf_handle_user.c index 45d8ca186..fce7cbf1e 100644 --- a/libs/platform/user/ebpf_handle_user.c +++ b/libs/platform/user/ebpf_handle_user.c @@ -40,7 +40,7 @@ ebpf_handle_table_terminate() } _Must_inspect_result_ ebpf_result_t -ebpf_handle_create(ebpf_handle_t* handle, ebpf_base_object_t* object) +ebpf_handle_create(_Out_ ebpf_handle_t* handle, _Inout_ ebpf_base_object_t* object) { EBPF_LOG_ENTRY(); ebpf_handle_t new_handle;