diff --git a/deps_adapter/BUILD.gn b/deps_adapter/BUILD.gn index 52fa2f7d52c59a252a9f69bd4e9fa2dad9309092..07df9b9134b4e79af7882a33c934787a102a4ed6 100644 --- a/deps_adapter/BUILD.gn +++ b/deps_adapter/BUILD.gn @@ -160,6 +160,7 @@ if (defined(ohos_lite)) { "-DSET_THREAD_NAME", ] branch_protector_ret = "pac_ret" + stack_protector_ret = true sanitize = { cfi = true cfi_cross_dso = true diff --git a/services/BUILD.gn b/services/BUILD.gn index 94b8b838d5e404a41c8c063f48c7651e16dfb078..c74f5e5ac05413e3c15e1d2c46e9135f4e6eb0e1 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -207,6 +207,7 @@ if (os_level == "mini" || os_level == "small") { include_dirs += identity_manager_inc branch_protector_ret = "pac_ret" + stack_protector_ret = true sanitize = { cfi = true cfi_cross_dso = true @@ -273,6 +274,7 @@ if (os_level == "mini" || os_level == "small") { } branch_protector_ret = "pac_ret" + stack_protector_ret = true sanitize = { cfi = true cfi_cross_dso = true @@ -329,6 +331,7 @@ if (os_level == "mini" || os_level == "small") { } branch_protector_ret = "pac_ret" + stack_protector_ret = true sanitize = { cfi = true cfi_cross_dso = true diff --git a/services/frameworks/src/plugin_adapter/dynamic_plugin_adapter.c b/services/frameworks/src/plugin_adapter/dynamic_plugin_adapter.c index 830d035b3623fa554b03267207807c7672a231e0..dc58e1eb8a25964b3518e93b8e8fde510b1b0187 100644 --- a/services/frameworks/src/plugin_adapter/dynamic_plugin_adapter.c +++ b/services/frameworks/src/plugin_adapter/dynamic_plugin_adapter.c @@ -134,21 +134,20 @@ void LoadExtendPlugin(void) do { g_handle = DevAuthDlopen("/system/lib64/libdevice_auth_ext.z.so"); if (g_handle != NULL) { - LOGE("[Plugin]: open lib64 dynamic plugin success."); + LOGI("[Plugin]: Open lib64 dynamic plugin success."); break; } g_handle = DevAuthDlopen("/system/lib/libdevice_auth_ext.z.so"); } while (0); if (g_handle == NULL) { - LOGE("[Plugin]: open lib dynamic plugin failed."); + LOGI("[Plugin]: There are no plugin that need to be loaded."); return; } + LOGI("[Plugin]: Open lib32 dynamic plugin success."); if (LoadDynamicPlugin(g_handle) != HC_SUCCESS) { DevAuthDlclose(g_handle); g_handle = NULL; - return; } - LOGI("[Plugin]: load extend plugin success."); } void UnloadExtendPlugin(void) diff --git a/services/legacy/group_manager/src/broadcast_manager/broadcast_manager.c b/services/legacy/group_manager/src/broadcast_manager/broadcast_manager.c index 305f9cbe414f759fe3b5db6fc6c93218a8defcd8..cfeeeee899ff4f569d9be10d01fb8cd2358987be 100644 --- a/services/legacy/group_manager/src/broadcast_manager/broadcast_manager.c +++ b/services/legacy/group_manager/src/broadcast_manager/broadcast_manager.c @@ -211,6 +211,7 @@ static int32_t UpdateListenerIfExist(const char *appId, const DataChangeListener return HC_ERR_MEMORY_COPY; } g_broadcastMutex->unlock(g_broadcastMutex); + LOGI("Successfully updated a listener. [AppId]: %s", appId); return HC_SUCCESS; } } @@ -250,7 +251,7 @@ static int32_t AddListenerIfNotExist(const char *appId, const DataChangeListener g_broadcastMutex->lock(g_broadcastMutex); g_listenerEntryVec.pushBack(&g_listenerEntryVec, &entry); g_broadcastMutex->unlock(g_broadcastMutex); - LOGI("[End]: Service register listener successfully!"); + LOGI("Successfully added a listener. [AppId]: %s", appId); return HC_SUCCESS; } @@ -336,10 +337,10 @@ int32_t RemoveListener(const char *appId) HcFree(entry->listener); ListenerEntry tempEntry; HC_VECTOR_POPELEMENT(&g_listenerEntryVec, &tempEntry, index); - LOGI("[End]: Service deregister listener successfully!"); + LOGI("Successfully removed a listener. [AppId]: %s", appId); return HC_SUCCESS; } } - LOGI("[End]: The listener does not exist!"); + LOGI("The listener does not exist! [AppId]: %s", appId); return HC_SUCCESS; } diff --git a/services/legacy/group_manager/src/callback_manager/callback_manager.c b/services/legacy/group_manager/src/callback_manager/callback_manager.c index b94dfe18abb5851235f58a93adc8b4795be981f8..02da7726b3b70a874469a463ea8d2a2a264bccec 100644 --- a/services/legacy/group_manager/src/callback_manager/callback_manager.c +++ b/services/legacy/group_manager/src/callback_manager/callback_manager.c @@ -46,6 +46,7 @@ static int32_t UpdateCallbackIfExist(const char *appId, const DeviceAuthCallback return HC_ERR_MEMORY_COPY; } g_callbackMutex->unlock(g_callbackMutex); + LOGI("Successfully updated a callback! [AppId]: %s", appId); return HC_SUCCESS; } } @@ -90,7 +91,7 @@ static int32_t AddCallbackIfNotExist(const char *appId, const DeviceAuthCallback return HC_ERR_MEMORY_COPY; } g_callbackMutex->unlock(g_callbackMutex); - LOGD("[End]: Add callback successfully!"); + LOGI("Successfully added a callback! [AppId]: %s", appId); return HC_SUCCESS; } @@ -205,10 +206,12 @@ int32_t UnRegGroupManagerCallback(const char *appId) CallbackEntry tempEntry; HC_VECTOR_POPELEMENT(&g_callbackVec, &tempEntry, index); g_callbackMutex->unlock(g_callbackMutex); + LOGI("Successfully removed a callback. [AppId]: %s", appId); return HC_SUCCESS; } } g_callbackMutex->unlock(g_callbackMutex); + LOGI("The callback does not exist! [AppId]: %s", appId); return HC_SUCCESS; } diff --git a/services/legacy/group_manager/src/group_operation/group_operation_common.c b/services/legacy/group_manager/src/group_operation/group_operation_common.c index c046b265e7c93405db0cd54d3da541d3124546ba..653bbd2b9fa7983f1632ffade8739027fb6f0b48 100644 --- a/services/legacy/group_manager/src/group_operation/group_operation_common.c +++ b/services/legacy/group_manager/src/group_operation/group_operation_common.c @@ -868,7 +868,7 @@ int32_t CheckGroupExist(int32_t osAccountId, const char *groupId) return HC_ERR_NULL_PTR; } if (!IsGroupExistByGroupId(osAccountId, groupId)) { - LOGE("The group does not exist!"); + LOGE("The group does not exist! [GroupId]: %s", groupId); return HC_ERR_GROUP_NOT_EXIST; } return HC_SUCCESS;