From 6154a44e85f01e92ab771b6ff3459851b6912f98 Mon Sep 17 00:00:00 2001 From: zhenghui Date: Wed, 21 Feb 2024 17:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=AD=BE=E5=90=8D=E4=BD=BF?= =?UTF-8?q?=E8=83=BDcfi=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhenghui --- interfaces/innerkits/code_sign_utils/BUILD.gn | 6 ++++++ utils/BUILD.gn | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/interfaces/innerkits/code_sign_utils/BUILD.gn b/interfaces/innerkits/code_sign_utils/BUILD.gn index a781255..4a49de1 100644 --- a/interfaces/innerkits/code_sign_utils/BUILD.gn +++ b/interfaces/innerkits/code_sign_utils/BUILD.gn @@ -19,6 +19,12 @@ config("public_code_sign_utils_configs") { } ohos_shared_library("libcode_sign_utils") { + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } + branch_protector_ret = "pac_ret" sources = [ "${code_signature_root_dir}/utils/src/code_sign_block.cpp", "${code_signature_root_dir}/utils/src/file_helper.cpp", diff --git a/utils/BUILD.gn b/utils/BUILD.gn index 885f1c6..3e62d76 100644 --- a/utils/BUILD.gn +++ b/utils/BUILD.gn @@ -15,6 +15,12 @@ import("//build/ohos.gni") import("../code_signature.gni") ohos_source_set("fsverity_sign_src_set") { + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + } + branch_protector_ret = "pac_ret" sources = [ "src/fsverity_utils_helper.cpp", "src/openssl_utils.cpp", -- Gitee