diff --git a/7ed2da7aedf8bc8ad4c4efe7acbda60ba061be6e.patch b/7ed2da7aedf8bc8ad4c4efe7acbda60ba061be6e.patch new file mode 100644 index 0000000..b9615bd --- /dev/null +++ b/7ed2da7aedf8bc8ad4c4efe7acbda60ba061be6e.patch @@ -0,0 +1,34 @@ +commit 7ed2da7aedf8bc8ad4c4efe7acbda60ba061be6e +Author: Aristeu Rozanski +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 + Signed-off-by: Mauro Carvalho Chehab + +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*/ + }; + diff --git a/rasdaemon.spec b/rasdaemon.spec index c488060..fb2aa7a 100644 --- a/rasdaemon.spec +++ b/rasdaemon.spec @@ -1,6 +1,6 @@ Name: rasdaemon Version: 0.6.7 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Utility to receive RAS error tracings License: GPL-2.0-only URL: http://git.infradead.org/users/mchehab/rasdaemon.git @@ -36,6 +36,7 @@ Patch27: b6a64416ab31b66ce92cabcc7fa1f3c5e9db2e87.patch Patch28: 9c86f6255f67a8bae28cd46c54500fc16bfc7a30.patch Patch29: 9bd84aef87978b806178a73ed33c39d6c442fc1f.patch Patch30: 885e546add918457c453bd3f753ac7df90b39e36.patch +Patch31: 7ed2da7aedf8bc8ad4c4efe7acbda60ba061be6e.patch ExcludeArch: s390 s390x BuildRequires: make @@ -101,6 +102,7 @@ an utility for reporting current error counts from the EDAC sysfs files. %patch28 -p1 %patch29 -p1 %patch30 -p1 +%patch31 -p1 # The tarball is locked in time the first time aclocal was ran and will keep # 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 %changelog +* Thu Jun 20 2024 Aristeu Rozanski 0.6.7-12 +- mce-amd-smca: update smca_hwid to use smca_bank_types [RHEL-24170] + * Wed May 08 2024 Aristeu Rozanski 0.6.7-11 - Fix excessive block messages [RHEL-8708]