diff --git a/frameworks/js/napi/client/cfi_blocklist.txt b/frameworks/js/napi/client/cfi_blocklist.txt index ccd00cd0418ee79e2cd07cd9c256d6f6b9260942..e206899d4a21ecbe633d721c766a9b4fe381493e 100644 --- a/frameworks/js/napi/client/cfi_blocklist.txt +++ b/frameworks/js/napi/client/cfi_blocklist.txt @@ -12,4 +12,18 @@ # limitations under the License. [cfi] -src:*session_manager.cpp \ No newline at end of file +type:*OHOS::UpdateEngine::IUpdater* +type:*OHOS::UpdateEngine::BaseSession* +type:*OHOS::UpdateEngine::BaseUpdateSession* +type:*OHOS::UpdateEngine::BaseMigratePromiseSession* +type:*OHOS::UpdateEngine::UpdateAsyncession* +type:*OHOS::UpdateEngine::BaseAsyncSession* +type:*OHOS::UpdateEngine::NapiSession* +type:*OHOS::UpdateEngine::BasePromiseSession* +type:*OHOS::UpdateEngine::BaseMigratePromiseSession* +src:*iupdater.cpp +src:*update_client.cpp +src:*update_session.cpp +src:*session_manager.cpp +src:*update_moudle.cpp +src:*napi_session.cpp \ No newline at end of file diff --git a/services/engine/BUILD.gn b/services/engine/BUILD.gn index 1e3264592ef6a422702fdc2d6ca0ed926e3ac528..5729a8633738f44f60cbffaf3f3fded74a006f60 100644 --- a/services/engine/BUILD.gn +++ b/services/engine/BUILD.gn @@ -29,6 +29,14 @@ ohos_prebuilt_etc("updater_sa.cfg") { } ohos_shared_library("$updateengine_library_name") { + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "./cfi_blocklist.txt" + } + branch_protector_ret = "pac_ret" + shlib_type = "sa" include_dirs = sa_include_dirs sources = sa_sources diff --git a/services/engine/cfi_blocklist.txt b/services/engine/cfi_blocklist.txt new file mode 100644 index 0000000000000000000000000000000000000000..4b0667797473a146b56d5f173e3fe78165d806d0 --- /dev/null +++ b/services/engine/cfi_blocklist.txt @@ -0,0 +1,15 @@ +# Copyright (C) 2022-2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[cfi] +src:*progress_thread.cpp \ No newline at end of file