!157 fix uint8 bug and change isolation default value

From: @luckky7 
Reviewed-by: @lvying6 
Signed-off-by: @hubin95, @lvying6
This commit is contained in:
openeuler-ci-bot 2024-11-01 08:00:22 +00:00 committed by Gitee
commit 14817039f4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 69 additions and 1 deletions

View File

@ -0,0 +1,61 @@
From 076e3820595e50ca2aa75f3655c461a2a53428ef Mon Sep 17 00:00:00 2001
From: luckky <guodashun1@huawei.com>
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

View File

@ -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 <guodashun1@huawei.com> - 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 <guodashun1@huawei.com> - 1.0.2-17
- Type:bugfix
- CVE:NA