From ba9a98ef8aee6e11a2c131a5eab8194e191cf708 Mon Sep 17 00:00:00 2001 From: luckky Date: Fri, 1 Nov 2024 15:05:30 +0800 Subject: [PATCH] fix uint8 bug and change isolation default value --- ...g-and-change-isolation-default-value.patch | 61 +++++++++++++++++++ sysSentry.spec | 9 ++- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 fix-uint8-bug-and-change-isolation-default-value.patch diff --git a/fix-uint8-bug-and-change-isolation-default-value.patch b/fix-uint8-bug-and-change-isolation-default-value.patch new file mode 100644 index 0000000..f029684 --- /dev/null +++ b/fix-uint8-bug-and-change-isolation-default-value.patch @@ -0,0 +1,61 @@ +From 076e3820595e50ca2aa75f3655c461a2a53428ef Mon Sep 17 00:00:00 2001 +From: luckky +Date: Fri, 1 Nov 2024 15:01:39 +0800 +Subject: [PATCH] fix uint8 bug and change isolation default value + +--- + src/c/hbm_online_repair/hbm_online_repair.env | 2 +- + src/c/hbm_online_repair/non-standard-hbm-repair.c | 8 ++++---- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/c/hbm_online_repair/hbm_online_repair.env b/src/c/hbm_online_repair/hbm_online_repair.env +index de56079..7166c8d 100644 +--- a/src/c/hbm_online_repair/hbm_online_repair.env ++++ b/src/c/hbm_online_repair/hbm_online_repair.env +@@ -1,2 +1,2 @@ + HBM_ONLINE_REPAIR_LOG_LEVEL=1 +-PAGE_ISOLATION_THRESHOLD=128 ++PAGE_ISOLATION_THRESHOLD=3355443 +diff --git a/src/c/hbm_online_repair/non-standard-hbm-repair.c b/src/c/hbm_online_repair/non-standard-hbm-repair.c +index f26d8ae..b8dde7a 100644 +--- a/src/c/hbm_online_repair/non-standard-hbm-repair.c ++++ b/src/c/hbm_online_repair/non-standard-hbm-repair.c +@@ -359,7 +359,7 @@ static int write_file(char *path, const char *name, unsigned long long value) + + fd = open(fname, O_WRONLY); + if (fd < 0) { +- log(LOG_WARNING, "HBM ACLS: Cannot to open '%s': %s\n", ++ log(LOG_WARNING, "HBM: Cannot to open '%s': %s\n", + fname, strerror(errno)); + return -errno; + } +@@ -367,7 +367,7 @@ static int write_file(char *path, const char *name, unsigned long long value) + snprintf(buf, sizeof(buf), "0x%llx\n", value); + ret = write(fd, buf, strlen(buf)); + if (ret <= 0) +- log(LOG_WARNING, "HBM ACLS: Failed to set %s (0x%llx): %s\n", ++ log(LOG_WARNING, "HBM: Failed to set %s (0x%llx): %s\n", + fname, value, strerror(errno)); + + close(fd); +@@ -557,7 +557,7 @@ static int hbmc_hbm_page_isolate(const struct hisi_common_error_section *err) + return ret < 0 ? ret : 0; + } + +-static int hbmc_hbm_after_repair(bool is_acls, const int repair_ret, const unsigned long long paddr) ++static uint8_t hbmc_hbm_after_repair(bool is_acls, const int repair_ret, const unsigned long long paddr) + { + int ret; + if (repair_ret <= 0) { +@@ -577,7 +577,7 @@ static int hbmc_hbm_after_repair(bool is_acls, const int repair_ret, const unsig + } + } + +-static uint8_t hbmc_hbm_repair(const struct hisi_common_error_section *err, char *path) ++static int hbmc_hbm_repair(const struct hisi_common_error_section *err, char *path) + { + unsigned long long paddr; + int ret; +-- +2.43.0 + diff --git a/sysSentry.spec b/sysSentry.spec index ecbbc28..cef9db6 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 17 +Release: 18 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -28,6 +28,7 @@ Patch15: add-separator-to-err-info.patch Patch16: remove-threshold-max-cpu-cores.patch Patch17: add-hbm-online-repair.patch Patch18: fix-hbm-online-repair-notice-and-efi-create.patch +Patch19: fix-uint8-bug-and-change-isolation-default-value.patch BuildRequires: cmake gcc-c++ BuildRequires: python3 python3-setuptools @@ -217,6 +218,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py %changelog +* Fri Nov 1 2024 luckky - 1.0.2-18 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix uint8 bug and change page isolation threshold default value + * Mon Oct 28 2024 luckky - 1.0.2-17 - Type:bugfix - CVE:NA