mce-amd-smca: update smca_hwid to use smca_bank_types
Fixes: RHEL-24170 Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
This commit is contained in:
parent
5cde7234ff
commit
f6af42e5ef
34
7ed2da7aedf8bc8ad4c4efe7acbda60ba061be6e.patch
Normal file
34
7ed2da7aedf8bc8ad4c4efe7acbda60ba061be6e.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
commit 7ed2da7aedf8bc8ad4c4efe7acbda60ba061be6e
|
||||||
|
Author: Aristeu Rozanski <arozansk@redhat.com>
|
||||||
|
Date: Tue Apr 9 10:06:30 2024 -0400
|
||||||
|
|
||||||
|
mce-amd-smca: update smca_hwid to use smca_bank_types
|
||||||
|
|
||||||
|
bank_type is used as smca_bank_types everywhere, there's no point in
|
||||||
|
declaring it as unsigned int. It also upsets covscan:
|
||||||
|
|
||||||
|
3. rasdaemon-0.6.7/mce-amd-smca.c:914: assignment: Assigning: "bank_type" = "s_hwid->bank_type".
|
||||||
|
7. rasdaemon-0.6.7/mce-amd-smca.c:926: cond_at_most: Checking "bank_type >= 64U" implies that "bank_type" and "s_hwid->bank_type" may be up to 63 on the false branch.
|
||||||
|
14. rasdaemon-0.6.7/mce-amd-smca.c:942: overrun-local: Overrunning array "smca_mce_descs" of 38 16-byte elements at element index 63 (byte offset 1023) using index "bank_type" (which evaluates to 63).
|
||||||
|
# 940| /* Only print the descriptor of valid extended error code */
|
||||||
|
# 941| if (xec < smca_mce_descs[bank_type].num_descs)
|
||||||
|
# 942|-> mce_snprintf(e->mcastatus_msg,
|
||||||
|
# 943| "%s. Ext Err Code: %d",
|
||||||
|
# 944| smca_mce_descs[bank_type].descs[xec],
|
||||||
|
|
||||||
|
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
|
||||||
|
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
||||||
|
|
||||||
|
diff --git a/mce-amd-smca.c b/mce-amd-smca.c
|
||||||
|
index 7521ff7..6632663 100644
|
||||||
|
--- a/mce-amd-smca.c
|
||||||
|
+++ b/mce-amd-smca.c
|
||||||
|
@@ -706,7 +706,7 @@ static struct smca_mce_desc smca_mce_descs[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
struct smca_hwid {
|
||||||
|
- unsigned int bank_type; /* Use with smca_bank_types for easy indexing.*/
|
||||||
|
+ enum smca_bank_types bank_type;
|
||||||
|
uint32_t mcatype_hwid; /* mcatype,hwid bit 63-32 in MCx_IPID Register*/
|
||||||
|
};
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: rasdaemon
|
Name: rasdaemon
|
||||||
Version: 0.6.7
|
Version: 0.6.7
|
||||||
Release: 11%{?dist}
|
Release: 12%{?dist}
|
||||||
Summary: Utility to receive RAS error tracings
|
Summary: Utility to receive RAS error tracings
|
||||||
License: GPL-2.0-only
|
License: GPL-2.0-only
|
||||||
URL: http://git.infradead.org/users/mchehab/rasdaemon.git
|
URL: http://git.infradead.org/users/mchehab/rasdaemon.git
|
||||||
@ -36,6 +36,7 @@ Patch27: b6a64416ab31b66ce92cabcc7fa1f3c5e9db2e87.patch
|
|||||||
Patch28: 9c86f6255f67a8bae28cd46c54500fc16bfc7a30.patch
|
Patch28: 9c86f6255f67a8bae28cd46c54500fc16bfc7a30.patch
|
||||||
Patch29: 9bd84aef87978b806178a73ed33c39d6c442fc1f.patch
|
Patch29: 9bd84aef87978b806178a73ed33c39d6c442fc1f.patch
|
||||||
Patch30: 885e546add918457c453bd3f753ac7df90b39e36.patch
|
Patch30: 885e546add918457c453bd3f753ac7df90b39e36.patch
|
||||||
|
Patch31: 7ed2da7aedf8bc8ad4c4efe7acbda60ba061be6e.patch
|
||||||
|
|
||||||
ExcludeArch: s390 s390x
|
ExcludeArch: s390 s390x
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@ -101,6 +102,7 @@ an utility for reporting current error counts from the EDAC sysfs files.
|
|||||||
%patch28 -p1
|
%patch28 -p1
|
||||||
%patch29 -p1
|
%patch29 -p1
|
||||||
%patch30 -p1
|
%patch30 -p1
|
||||||
|
%patch31 -p1
|
||||||
|
|
||||||
# The tarball is locked in time the first time aclocal was ran and will keep
|
# The tarball is locked in time the first time aclocal was ran and will keep
|
||||||
# requiring an older version of automake
|
# requiring an older version of automake
|
||||||
@ -136,6 +138,9 @@ sed -i "s/^PAGE_CE_ACTION=.*/PAGE_CE_ACTION=account/" %{buildroot}/%{_sysconfdir
|
|||||||
%{_sysconfdir}/sysconfig/rasdaemon
|
%{_sysconfdir}/sysconfig/rasdaemon
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 20 2024 Aristeu Rozanski <aris@redhat.com> 0.6.7-12
|
||||||
|
- mce-amd-smca: update smca_hwid to use smca_bank_types [RHEL-24170]
|
||||||
|
|
||||||
* Wed May 08 2024 Aristeu Rozanski <aris@redhat.com> 0.6.7-11
|
* Wed May 08 2024 Aristeu Rozanski <aris@redhat.com> 0.6.7-11
|
||||||
- Fix excessive block messages [RHEL-8708]
|
- Fix excessive block messages [RHEL-8708]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user