diff --git a/0016-fix-wrong-spelling-and-null-pointer-dereference-issu.patch b/0016-fix-wrong-spelling-and-null-pointer-dereference-issu.patch new file mode 100644 index 0000000000000000000000000000000000000000..5395c620b7924cc4afa75825329d67c324f14cd9 --- /dev/null +++ b/0016-fix-wrong-spelling-and-null-pointer-dereference-issu.patch @@ -0,0 +1,52 @@ +From 9d0ff75bf869574b5f96079cf5494fe11d20f160 Mon Sep 17 00:00:00 2001 +From: zgzxx +Date: Sat, 20 Mar 2021 17:27:36 +0800 +Subject: [PATCH] fix wrong spelling and null pointer dereference issue + + +diff --git a/tools/codegener/intel/CodeGen.ml b/tools/codegener/intel/CodeGen.ml +index dc43942..d9ccf7c 100644 +--- a/tools/codegener/intel/CodeGen.ml ++++ b/tools/codegener/intel/CodeGen.ml +@@ -872,7 +872,11 @@ let gen_func_uproxy (tf: Ast.trusted_func) (idx: int) (ec: enclave_content) = + let sgx_ecall_fn = get_sgx_fname SGX_ECALL tf.Ast.tf_is_switchless in + + (* Normal case - do ECALL with marshaling structure*) +- let ecall_with_ms = sprintf "result = enclave->list_ops_node->ops_desc->ops->cc_ecall_enclave( \n\ ++ let ecall_with_ms = sprintf "if(!enclave || !enclave->list_ops_node || !enclave->list_ops_node->ops_desc ||\n\ ++ \t\t!enclave->list_ops_node->ops_desc->ops || \n\ ++ \t\t!enclave->list_ops_node->ops_desc->ops->cc_ecall_enclave)\n\ ++ \t\treturn CC_ERROR_BAD_PARAMETERS; ++ result = enclave->list_ops_node->ops_desc->ops->cc_ecall_enclave( \n\ + \t\tenclave,\n\ + \t\t%d,\n\ + \t\tNULL,\n\ +@@ -885,7 +889,11 @@ let gen_func_uproxy (tf: Ast.trusted_func) (idx: int) (ec: enclave_content) = + (* Rare case - the trusted function doesn't have parameter nor return value. + * In this situation, no marshaling structure is required - passing in NULL. + *) +- let ecall_null = sprintf "result = enclave->list_ops_node->ops_desc->ops->cc_ecall_enclave( \n\ ++ let ecall_null = sprintf "if(!enclave || !enclave->list_ops_node || !enclave->list_ops_node->ops_desc ||\n\ ++ \t\t!enclave->list_ops_node->ops_desc->ops || \n\ ++ \t\t!enclave->list_ops_node->ops_desc->ops->cc_ecall_enclave)\n\ ++ \t\treturn CC_ERROR_BAD_PARAMETERS; ++ result = enclave->list_ops_node->ops_desc->ops->cc_ecall_enclave( \n\ + \t\tenclave,\n\ + \t\t%d,\n\ + \t\tNULL,\n\ +diff --git a/tools/codegener/intel/Util.ml b/tools/codegener/intel/Util.ml +index a77637e..9dd22bd 100644 +--- a/tools/codegener/intel/Util.ml ++++ b/tools/codegener/intel/Util.ml +@@ -187,7 +187,7 @@ let get_file_path (fname: string) = + try + List.find Sys.file_exists fn_list + with +- Not_found -> failwithf "File not found within search paths or search paths is permisson denied: %s\n" fname ++ Not_found -> failwithf "File not found within search paths or search paths is permission denied: %s\n" fname + + (* Get the short name of the given file name. + * ------------------------------------------ +-- +2.27.0 + diff --git a/secGear.spec b/secGear.spec index eb77b0aa727762ff743137f62d5760907bfe6099..fb2d41d73b3e4894a3580166dd3978def25e35e9 100644 --- a/secGear.spec +++ b/secGear.spec @@ -1,6 +1,6 @@ Name: secGear Version: 0.1.0 -Release: 6%{?dist} +Release: 10%{?dist} Summary: secGear is an SDK to develop confidential computing apps based on hardware enclave features ExclusiveArch: x86_64 @@ -9,6 +9,23 @@ License: Mulan PSL v2 URL: https://gitee.com/openeuler/secGear Source0: https://gitee.com/openeuler/secGear/repository/archive/v%{version}.tar.gz +Patch0: 0001-add-README.cn.md.patch +Patch1: 0002-it-is-better-to-define-enum-from-0-rather-than-1.patch +Patch2: 0003-update-README.cn.md.patch +Patch3: 0004-update-README.cn.md.patch +Patch4: 0005-delete-unnecessary-README.cn.md.patch +Patch5: 0006-fix-issues-about-double-create-destory.patch +Patch6: 0007-to-make-secGear-log-more-clear.patch +Patch7: 0008-modify-path-error.patch +Patch8: 0009-fix-sgxssl-edl.patch +Patch9: 0010-update-docs-build_install.md.patch +Patch10: 0011-modify-the-prompt-information.patch +Patch11: 0012-parse-new-error-code-and-del-redundant-print.patch +Patch12: 0013-fix-error-print.patch +Patch13: 0014-set-umask-in-sign_tool.sh.patch +Patch14: 0015-1.fix-the-race-of-ecall-and-enclave-destroy.patch +Patch15: 0016-fix-wrong-spelling-and-null-pointer-dereference-issu.patch + BuildRequires: gcc python3 automake autoconf libtool BUildRequires: glibc glibc-devel %ifarch x86_64 @@ -99,6 +116,18 @@ rm %{buildroot}/home* -rf %endif %changelog +* Sat Mar 20 2021 zhangguangzhi - 0.1.0-10 +- DESC: backport patch + +* Thu Mar 19 2021 wanghongzhe - 0.1.0-9 +- DESC: fix local compile error + +* Thu Mar 18 2021 gaoyusong - 0.1.0-8 +- DESC: backport patch + +* Mon Mar 15 2021 zhangguangzhi - 0.1.0-7 +- DESC: backport patch + * Wed Mar 10 2021 chenmaodong - 0.1.0-6 - DESC: change requires from linux-sgx-sdk to sgxsdk