Accepting request 974669 from home:kodymo

- Update to version 181:
  * mcelog: Add support for Raptorlake
- Adopt patches to latest git version
M    Start-consolidating-AMD-specific-stuff.patch
M    add-f10h-support.patch
M    add-f11h-support.patch
M    add-f12h-support.patch
M    add-f14h-support.patch
M    add-f15h-support.patch
M    add-f16h-support.patch
M    email.patch
M    fix_setgroups_missing_call.patch
M    mcelog_invert_prefill_db_warning.patch
- Use Python3 shebang instead of python
A    python3_shebang
- Use Github URL

- Update to version 180:
  * Fix warnings in sysfs.c
  * mcelog: Change "DDR4" string to "DDR" for i10nm platforms
  * Fix logrotate syntax
  * remove outdated mcelog.conf.5 manual file
  * add furture print function for Python2
  * fix python errors in genconfig.py
  * fix the buf not freed in read_field
  * mcelog: Print warning for locked down kernel
  * mcelog: Handle sysfs files without length
  * Fix make test fail

OBS-URL: https://build.opensuse.org/request/show/974669
OBS-URL: https://build.opensuse.org/package/show/Base:System/mcelog?expand=0&rev=99
This commit is contained in:
Thomas Renninger 2022-05-03 14:52:12 +00:00 committed by Git OBS Bridge
parent 250261c5de
commit 69342a5d53
18 changed files with 281 additions and 154 deletions

View File

@ -18,9 +18,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
rename k8.c => amd.c (97%) rename k8.c => amd.c (97%)
rename k8.h => amd.h (79%) rename k8.h => amd.h (79%)
--- a/Makefile Index: mcelog-181/Makefile
+++ b/Makefile ===================================================================
@@ -31,7 +31,7 @@ --- mcelog-181.orig/Makefile
+++ mcelog-181/Makefile
@@ -31,7 +31,7 @@ all: mcelog
.PHONY: install clean depend FORCE .PHONY: install clean depend FORCE
@ -29,8 +31,10 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
nehalem.o dunnington.o tulsa.o config.o memutil.o msg.o \ nehalem.o dunnington.o tulsa.o config.o memutil.o msg.o \
eventloop.o leaky-bucket.o memdb.o server.o trigger.o \ eventloop.o leaky-bucket.o memdb.o server.o trigger.o \
client.o cache.o sysfs.o yellow.o page.o rbtree.o \ client.o cache.o sysfs.o yellow.o page.o rbtree.o \
Index: mcelog-181/amd.c
===================================================================
--- /dev/null --- /dev/null
+++ b/amd.c +++ mcelog-181/amd.c
@@ -0,0 +1,282 @@ @@ -0,0 +1,282 @@
+/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and +/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and
+ * Eric Morton. Hacked and extended for mcelog by AK. + * Eric Morton. Hacked and extended for mcelog by AK.
@ -314,8 +318,10 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
+ } + }
+ return 1; + return 1;
+} +}
Index: mcelog-181/amd.h
===================================================================
--- /dev/null --- /dev/null
+++ b/amd.h +++ mcelog-181/amd.h
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
+char *k8_bank_name(unsigned num); +char *k8_bank_name(unsigned num);
+void decode_amd_mc(enum cputype, struct mce *mce, int *ismemerr); +void decode_amd_mc(enum cputype, struct mce *mce, int *ismemerr);
@ -331,7 +337,9 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
+ +
+#define CASE_AMD_CPUS \ +#define CASE_AMD_CPUS \
+ case CPU_K8 + case CPU_K8
--- a/k8.c Index: mcelog-181/k8.c
===================================================================
--- mcelog-181.orig/k8.c
+++ /dev/null +++ /dev/null
@@ -1,281 +0,0 @@ @@ -1,281 +0,0 @@
-/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and -/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and
@ -615,7 +623,9 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
- } - }
- return 1; - return 1;
-} -}
--- a/k8.h Index: mcelog-181/k8.h
===================================================================
--- mcelog-181.orig/k8.h
+++ /dev/null +++ /dev/null
@@ -1,11 +0,0 @@ @@ -1,11 +0,0 @@
-char *k8_bank_name(unsigned num); -char *k8_bank_name(unsigned num);
@ -629,8 +639,10 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
-#define K8_MCELOG_THRESHOLD_LINK (4 * 9 + 1) -#define K8_MCELOG_THRESHOLD_LINK (4 * 9 + 1)
-#define K8_MCELOG_THRESHOLD_L3_CACHE (4 * 9 + 2) -#define K8_MCELOG_THRESHOLD_L3_CACHE (4 * 9 + 2)
-#define K8_MCELOG_THRESHOLD_FBDIMM (4 * 9 + 3) -#define K8_MCELOG_THRESHOLD_FBDIMM (4 * 9 + 3)
--- a/mcelog.c Index: mcelog-181/mcelog.c
+++ b/mcelog.c ===================================================================
--- mcelog-181.orig/mcelog.c
+++ mcelog-181/mcelog.c
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
#include <fnmatch.h> #include <fnmatch.h>
#include "mcelog.h" #include "mcelog.h"
@ -640,7 +652,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
#include "intel.h" #include "intel.h"
#include "p4.h" #include "p4.h"
#include "dmi.h" #include "dmi.h"
@@ -451,9 +451,9 @@ @@ -453,9 +453,9 @@ static void dump_mce(struct mce *m, unsi
time_t t = m->time; time_t t = m->time;
Wprintf("TIME %llu %s", m->time, ctime(&t)); Wprintf("TIME %llu %s", m->time, ctime(&t));
} }

View File

@ -1,7 +1,7 @@
<services> <services>
<service name="obs_scm" mode="localonly"> <service name="obs_scm" mode="localonly">
<param name="scm">git</param> <param name="scm">git</param>
<param name="url">git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git</param> <param name="url">https://github.com/andikleen/mcelog.git</param>
<param name="changesgenerate">enable</param> <param name="changesgenerate">enable</param>
<param name="versionrewrite-pattern">v(.*)</param> <param name="versionrewrite-pattern">v(.*)</param>
<param name="versionformat">@PARENT_TAG@</param> <param name="versionformat">@PARENT_TAG@</param>

View File

@ -3,4 +3,6 @@
<param name="url">https://github.com/andikleen/mcelog</param> <param name="url">https://github.com/andikleen/mcelog</param>
<param name="changesrevision">ee90ff20ce6a4d5e016aa249ce8b37f359f9fda4</param></service><service name="tar_scm"> <param name="changesrevision">ee90ff20ce6a4d5e016aa249ce8b37f359f9fda4</param></service><service name="tar_scm">
<param name="url">git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git</param> <param name="url">git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git</param>
<param name="changesrevision">c133a744e9ee6a2f40cbec4cfb0182d3ed1a792a</param></service></servicedata> <param name="changesrevision">a4edca25ef3bd8780ae1dc54bc203973ec7f1640</param></service><service name="tar_scm">
<param name="url">https://github.com/andikleen/mcelog.git</param>
<param name="changesrevision">a4edca25ef3bd8780ae1dc54bc203973ec7f1640</param></service></servicedata>

View File

@ -8,8 +8,10 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
mcelog.h | 1 mcelog.h | 1
4 files changed, 506 insertions(+), 51 deletions(-) 4 files changed, 506 insertions(+), 51 deletions(-)
--- a/amd.c Index: mcelog-181/amd.c
+++ b/amd.c ===================================================================
--- mcelog-181.orig/amd.c
+++ mcelog-181/amd.c
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
#include "mcelog.h" #include "mcelog.h"
#include "amd.h" #include "amd.h"
@ -19,7 +21,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
"data cache", "data cache",
"instruction cache", "instruction cache",
"bus unit", "bus unit",
@@ -22,28 +22,34 @@ @@ -22,28 +22,34 @@ static char *k8bank[] = {
"northbridge", "northbridge",
"fixed-issue reoder" "fixed-issue reoder"
}; };
@ -63,7 +65,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static char *nbextendederr[] = { static char *nbextendederr[] = {
"RAM ECC error", "RAM ECC error",
"CRC error", "CRC error",
@@ -65,6 +71,46 @@ @@ -65,6 +71,46 @@ static char *nbextendederr[] = {
"L3 Cache Tag Error", "L3 Cache Tag Error",
"L3 Cache LRU Error" "L3 Cache LRU Error"
}; };
@ -110,7 +112,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static char *highbits[32] = { static char *highbits[32] = {
[31] = "valid", [31] = "valid",
[30] = "error overflow (multiple errors)", [30] = "error overflow (multiple errors)",
@@ -100,6 +146,21 @@ @@ -100,6 +146,21 @@ static char *k8threshold[] = {
"Unknown threshold counter", "Unknown threshold counter",
}; };
@ -132,7 +134,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static void decode_k8_generic_errcode(u64 status) static void decode_k8_generic_errcode(u64 status)
{ {
@@ -245,21 +306,393 @@ @@ -245,21 +306,393 @@ static decoder_t decoders[] = {
[5] = decode_k8_fr_mc, [5] = decode_k8_fr_mc,
}; };
@ -534,7 +536,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
if (num < NELE(k8bank)) if (num < NELE(k8bank))
s = k8bank[num]; s = k8bank[num];
else if (num >= K8_MCE_THRESHOLD_BASE && else if (num >= K8_MCE_THRESHOLD_BASE &&
@@ -270,13 +703,16 @@ @@ -270,13 +703,16 @@ char *k8_bank_name(unsigned num)
return buf; return buf;
} }
@ -559,8 +561,10 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
+ } + }
+ return 1; + return 1;
} }
--- a/amd.h Index: mcelog-181/amd.h
+++ b/amd.h ===================================================================
--- mcelog-181.orig/amd.h
+++ mcelog-181/amd.h
@@ -1,6 +1,25 @@ @@ -1,6 +1,25 @@
+#include <stdbool.h> +#include <stdbool.h>
+ +
@ -588,7 +592,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
#define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */ #define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */
#define K8_MCE_THRESHOLD_TOP (K8_MCE_THRESHOLD_BASE + 6 * 9) #define K8_MCE_THRESHOLD_TOP (K8_MCE_THRESHOLD_BASE + 6 * 9)
@@ -10,6 +29,8 @@ @@ -10,6 +29,8 @@ int mce_filter_k8(struct mce *m);
#define K8_MCELOG_THRESHOLD_L3_CACHE (4 * 9 + 2) #define K8_MCELOG_THRESHOLD_L3_CACHE (4 * 9 + 2)
#define K8_MCELOG_THRESHOLD_FBDIMM (4 * 9 + 3) #define K8_MCELOG_THRESHOLD_FBDIMM (4 * 9 + 3)
@ -597,7 +601,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
#define EC(x) ((x) & 0xffff) #define EC(x) ((x) & 0xffff)
#define XEC(x, mask) (((x) >> 16) & mask) #define XEC(x, mask) (((x) >> 16) & mask)
@@ -22,23 +43,20 @@ @@ -22,23 +43,20 @@ int mce_filter_k8(struct mce *m);
#define INT_ERROR(x) (((x) & 0xF4FF) == 0x0400) #define INT_ERROR(x) (((x) & 0xF4FF) == 0x0400)
#define TT(x) (((x) >> 2) & 0x3) #define TT(x) (((x) >> 2) & 0x3)
@ -627,7 +631,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
enum tt_ids { enum tt_ids {
TT_INSTR = 0, TT_INSTR = 0,
@@ -72,3 +90,7 @@ @@ -72,3 +90,7 @@ enum rrrr_ids {
R4_EVICT, R4_EVICT,
R4_SNOOP, R4_SNOOP,
}; };
@ -635,9 +639,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
+#define CASE_AMD_CPUS \ +#define CASE_AMD_CPUS \
+ case CPU_K8: \ + case CPU_K8: \
+ case CPU_F10H + case CPU_F10H
--- a/mcelog.c Index: mcelog-181/mcelog.c
+++ b/mcelog.c ===================================================================
@@ -148,19 +148,20 @@ --- mcelog-181.orig/mcelog.c
+++ mcelog-181/mcelog.c
@@ -148,19 +148,20 @@ static void resolveaddr(unsigned long lo
static int mce_filter(struct mce *m, unsigned recordlen) static int mce_filter(struct mce *m, unsigned recordlen)
{ {
@ -662,7 +668,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
} }
static void print_tsc(int cpunum, __u64 tsc, unsigned long time) static void print_tsc(int cpunum, __u64 tsc, unsigned long time)
@@ -228,6 +229,7 @@ @@ -228,6 +229,7 @@ static char *cputype_name[] = {
[CPU_P6OLD] = "Intel PPro/P2/P3/old Xeon", [CPU_P6OLD] = "Intel PPro/P2/P3/old Xeon",
[CPU_CORE2] = "Intel Core", /* 65nm and 45nm */ [CPU_CORE2] = "Intel Core", /* 65nm and 45nm */
[CPU_K8] = "AMD K8 and derivates", [CPU_K8] = "AMD K8 and derivates",
@ -670,7 +676,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
[CPU_P4] = "Intel P4", [CPU_P4] = "Intel P4",
[CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")", [CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")",
[CPU_DUNNINGTON] = "Intel Xeon 7400 series", [CPU_DUNNINGTON] = "Intel Xeon 7400 series",
@@ -267,6 +269,7 @@ @@ -268,6 +270,7 @@ static struct config_choice cpu_choices[
{ "p6old", CPU_P6OLD }, { "p6old", CPU_P6OLD },
{ "core2", CPU_CORE2 }, { "core2", CPU_CORE2 },
{ "k8", CPU_K8 }, { "k8", CPU_K8 },
@ -678,7 +684,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
{ "p4", CPU_P4 }, { "p4", CPU_P4 },
{ "dunnington", CPU_DUNNINGTON }, { "dunnington", CPU_DUNNINGTON },
{ "xeon74xx", CPU_DUNNINGTON }, { "xeon74xx", CPU_DUNNINGTON },
@@ -388,9 +391,7 @@ @@ -390,9 +393,7 @@ static enum cputype setup_cpuid(u32 cpuv
case X86_VENDOR_INTEL: case X86_VENDOR_INTEL:
return select_intel_cputype(family, model); return select_intel_cputype(family, model);
case X86_VENDOR_AMD: case X86_VENDOR_AMD:
@ -689,7 +695,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
Eprintf("Unknown CPU type vendor %u family %u model %u", Eprintf("Unknown CPU type vendor %u family %u model %u",
cpuvendor, family, model); cpuvendor, family, model);
@@ -579,14 +580,9 @@ @@ -581,14 +582,9 @@ int is_cpu_supported(void)
} }
if (seen == ALL) { if (seen == ALL) {
@ -707,9 +713,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
Eprintf("ERROR: Hygon Processor family %d: mcelog does not support this processor. Please use the edac_mce_amd module instead.\n", family); Eprintf("ERROR: Hygon Processor family %d: mcelog does not support this processor. Please use the edac_mce_amd module instead.\n", family);
return 0; return 0;
} else if (!strcmp(vendor,"GenuineIntel")) } else if (!strcmp(vendor,"GenuineIntel"))
--- a/mcelog.h Index: mcelog-181/mcelog.h
+++ b/mcelog.h ===================================================================
@@ -119,6 +119,7 @@ --- mcelog-181.orig/mcelog.h
+++ mcelog-181/mcelog.h
@@ -119,6 +119,7 @@ enum cputype {
CPU_P6OLD, CPU_P6OLD,
CPU_CORE2, /* 65nm and 45nm */ CPU_CORE2, /* 65nm and 45nm */
CPU_K8, CPU_K8,

View File

@ -8,9 +8,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
mcelog.h | 1 + mcelog.h | 1 +
4 files changed, 26 insertions(+), 1 deletion(-) 4 files changed, 26 insertions(+), 1 deletion(-)
--- a/amd.c Index: mcelog-181/amd.c
+++ b/amd.c ===================================================================
@@ -155,6 +155,8 @@ --- mcelog-181.orig/amd.c
+++ mcelog-181/amd.c
@@ -155,6 +155,8 @@ enum cputype select_amd_cputype(u32 fami
return CPU_K8; return CPU_K8;
case 0x10: case 0x10:
return CPU_F10H; return CPU_F10H;
@ -19,7 +21,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
break; break;
} }
@@ -367,6 +369,16 @@ @@ -367,6 +369,16 @@ static bool f10h_mc0_mce(u16 ec, u8 xec)
return f12h_mc0_mce(ec, xec); return f12h_mc0_mce(ec, xec);
} }
@ -36,7 +38,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static void decode_mc0_mce(struct amd_decoder_ops *ops, struct mce *m) static void decode_mc0_mce(struct amd_decoder_ops *ops, struct mce *m)
{ {
u16 ec = EC(m->status); u16 ec = EC(m->status);
@@ -630,6 +642,12 @@ @@ -630,6 +642,12 @@ struct amd_decoder_ops fam_ops[] = {
.mc1_mce = k8_mc1_mce, .mc1_mce = k8_mc1_mce,
.mc2_mce = k8_mc2_mce, .mc2_mce = k8_mc2_mce,
}, },
@ -49,7 +51,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
}; };
static void __decode_amd_mc(enum cputype cpu, struct mce *mce) static void __decode_amd_mc(enum cputype cpu, struct mce *mce)
@@ -640,6 +658,9 @@ @@ -640,6 +658,9 @@ static void __decode_amd_mc(enum cputype
case CPU_F10H: case CPU_F10H:
ops = &fam_ops[AMD_F10H]; ops = &fam_ops[AMD_F10H];
break; break;
@ -59,18 +61,22 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
Eprintf("Huh? What family is it: 0x%x?!\n", cpu); Eprintf("Huh? What family is it: 0x%x?!\n", cpu);
return; return;
--- a/amd.h Index: mcelog-181/amd.h
+++ b/amd.h ===================================================================
@@ -93,4 +93,5 @@ --- mcelog-181.orig/amd.h
+++ mcelog-181/amd.h
@@ -93,4 +93,5 @@ enum rrrr_ids {
#define CASE_AMD_CPUS \ #define CASE_AMD_CPUS \
case CPU_K8: \ case CPU_K8: \
- case CPU_F10H - case CPU_F10H
+ case CPU_F10H: \ + case CPU_F10H: \
+ case CPU_F11H + case CPU_F11H
--- a/mcelog.c Index: mcelog-181/mcelog.c
+++ b/mcelog.c ===================================================================
@@ -230,6 +230,7 @@ --- mcelog-181.orig/mcelog.c
+++ mcelog-181/mcelog.c
@@ -230,6 +230,7 @@ static char *cputype_name[] = {
[CPU_CORE2] = "Intel Core", /* 65nm and 45nm */ [CPU_CORE2] = "Intel Core", /* 65nm and 45nm */
[CPU_K8] = "AMD K8 and derivates", [CPU_K8] = "AMD K8 and derivates",
[CPU_F10H] = "AMD Greyhound", [CPU_F10H] = "AMD Greyhound",
@ -78,7 +84,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
[CPU_P4] = "Intel P4", [CPU_P4] = "Intel P4",
[CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")", [CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")",
[CPU_DUNNINGTON] = "Intel Xeon 7400 series", [CPU_DUNNINGTON] = "Intel Xeon 7400 series",
@@ -270,6 +271,7 @@ @@ -271,6 +272,7 @@ static struct config_choice cpu_choices[
{ "core2", CPU_CORE2 }, { "core2", CPU_CORE2 },
{ "k8", CPU_K8 }, { "k8", CPU_K8 },
{ "f10h", CPU_F10H }, { "f10h", CPU_F10H },
@ -86,9 +92,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
{ "p4", CPU_P4 }, { "p4", CPU_P4 },
{ "dunnington", CPU_DUNNINGTON }, { "dunnington", CPU_DUNNINGTON },
{ "xeon74xx", CPU_DUNNINGTON }, { "xeon74xx", CPU_DUNNINGTON },
--- a/mcelog.h Index: mcelog-181/mcelog.h
+++ b/mcelog.h ===================================================================
@@ -120,6 +120,7 @@ --- mcelog-181.orig/mcelog.h
+++ mcelog-181/mcelog.h
@@ -120,6 +120,7 @@ enum cputype {
CPU_CORE2, /* 65nm and 45nm */ CPU_CORE2, /* 65nm and 45nm */
CPU_K8, CPU_K8,
CPU_F10H, CPU_F10H,

View File

@ -8,9 +8,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
mcelog.h | 1 + mcelog.h | 1 +
4 files changed, 17 insertions(+), 1 deletion(-) 4 files changed, 17 insertions(+), 1 deletion(-)
--- a/amd.c Index: mcelog-181/amd.c
+++ b/amd.c ===================================================================
@@ -157,6 +157,8 @@ --- mcelog-181.orig/amd.c
+++ mcelog-181/amd.c
@@ -157,6 +157,8 @@ enum cputype select_amd_cputype(u32 fami
return CPU_F10H; return CPU_F10H;
case 0x11: case 0x11:
return CPU_F11H; return CPU_F11H;
@ -19,7 +21,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
break; break;
} }
@@ -648,6 +650,12 @@ @@ -648,6 +650,12 @@ struct amd_decoder_ops fam_ops[] = {
.mc1_mce = k8_mc1_mce, .mc1_mce = k8_mc1_mce,
.mc2_mce = k8_mc2_mce, .mc2_mce = k8_mc2_mce,
}, },
@ -32,7 +34,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
}; };
static void __decode_amd_mc(enum cputype cpu, struct mce *mce) static void __decode_amd_mc(enum cputype cpu, struct mce *mce)
@@ -661,6 +669,9 @@ @@ -661,6 +669,9 @@ static void __decode_amd_mc(enum cputype
case CPU_F11H: case CPU_F11H:
ops = &fam_ops[AMD_F11H]; ops = &fam_ops[AMD_F11H];
break; break;
@ -42,9 +44,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
Eprintf("Huh? What family is it: 0x%x?!\n", cpu); Eprintf("Huh? What family is it: 0x%x?!\n", cpu);
return; return;
--- a/amd.h Index: mcelog-181/amd.h
+++ b/amd.h ===================================================================
@@ -9,6 +9,7 @@ --- mcelog-181.orig/amd.h
+++ mcelog-181/amd.h
@@ -9,6 +9,7 @@ enum amdcpu {
AMD_K8 = 0, AMD_K8 = 0,
AMD_F10H, AMD_F10H,
AMD_F11H, AMD_F11H,
@ -52,16 +56,18 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
AMD_F14H, AMD_F14H,
AMD_F15H, AMD_F15H,
AMD_F16H, AMD_F16H,
@@ -94,4 +95,5 @@ @@ -94,4 +95,5 @@ enum rrrr_ids {
#define CASE_AMD_CPUS \ #define CASE_AMD_CPUS \
case CPU_K8: \ case CPU_K8: \
case CPU_F10H: \ case CPU_F10H: \
- case CPU_F11H - case CPU_F11H
+ case CPU_F11H: \ + case CPU_F11H: \
+ case CPU_F12H + case CPU_F12H
--- a/mcelog.c Index: mcelog-181/mcelog.c
+++ b/mcelog.c ===================================================================
@@ -231,6 +231,7 @@ --- mcelog-181.orig/mcelog.c
+++ mcelog-181/mcelog.c
@@ -231,6 +231,7 @@ static char *cputype_name[] = {
[CPU_K8] = "AMD K8 and derivates", [CPU_K8] = "AMD K8 and derivates",
[CPU_F10H] = "AMD Greyhound", [CPU_F10H] = "AMD Greyhound",
[CPU_F11H] = "AMD Griffin", [CPU_F11H] = "AMD Griffin",
@ -69,7 +75,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
[CPU_P4] = "Intel P4", [CPU_P4] = "Intel P4",
[CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")", [CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")",
[CPU_DUNNINGTON] = "Intel Xeon 7400 series", [CPU_DUNNINGTON] = "Intel Xeon 7400 series",
@@ -272,6 +273,7 @@ @@ -273,6 +274,7 @@ static struct config_choice cpu_choices[
{ "k8", CPU_K8 }, { "k8", CPU_K8 },
{ "f10h", CPU_F10H }, { "f10h", CPU_F10H },
{ "f11h", CPU_F11H }, { "f11h", CPU_F11H },
@ -77,9 +83,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
{ "p4", CPU_P4 }, { "p4", CPU_P4 },
{ "dunnington", CPU_DUNNINGTON }, { "dunnington", CPU_DUNNINGTON },
{ "xeon74xx", CPU_DUNNINGTON }, { "xeon74xx", CPU_DUNNINGTON },
--- a/mcelog.h Index: mcelog-181/mcelog.h
+++ b/mcelog.h ===================================================================
@@ -121,6 +121,7 @@ --- mcelog-181.orig/mcelog.h
+++ mcelog-181/mcelog.h
@@ -121,6 +121,7 @@ enum cputype {
CPU_K8, CPU_K8,
CPU_F10H, CPU_F10H,
CPU_F11H, CPU_F11H,

View File

@ -8,9 +8,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
mcelog.h | 1 mcelog.h | 1
4 files changed, 93 insertions(+), 1 deletion(-) 4 files changed, 93 insertions(+), 1 deletion(-)
--- a/amd.c Index: mcelog-181/amd.c
+++ b/amd.c ===================================================================
@@ -159,6 +159,8 @@ --- mcelog-181.orig/amd.c
+++ mcelog-181/amd.c
@@ -159,6 +159,8 @@ enum cputype select_amd_cputype(u32 fami
return CPU_F11H; return CPU_F11H;
case 0x12: case 0x12:
return CPU_F12H; return CPU_F12H;
@ -19,7 +21,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
break; break;
} }
@@ -381,6 +383,58 @@ @@ -381,6 +383,58 @@ static bool k8_mc0_mce(u16 ec, u8 xec)
return f10h_mc0_mce(ec, xec); return f10h_mc0_mce(ec, xec);
} }
@ -78,7 +80,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static void decode_mc0_mce(struct amd_decoder_ops *ops, struct mce *m) static void decode_mc0_mce(struct amd_decoder_ops *ops, struct mce *m)
{ {
u16 ec = EC(m->status); u16 ec = EC(m->status);
@@ -402,6 +456,31 @@ @@ -402,6 +456,31 @@ static void decode_mc0_mce(struct amd_de
Eprintf("Corrupted MC0 MCE info?\n"); Eprintf("Corrupted MC0 MCE info?\n");
} }
@ -110,7 +112,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static void decode_mc1_mce(struct amd_decoder_ops *ops, struct mce *m) static void decode_mc1_mce(struct amd_decoder_ops *ops, struct mce *m)
{ {
u16 ec = EC(m->status); u16 ec = EC(m->status);
@@ -656,6 +735,12 @@ @@ -656,6 +735,12 @@ struct amd_decoder_ops fam_ops[] = {
.mc1_mce = k8_mc1_mce, .mc1_mce = k8_mc1_mce,
.mc2_mce = k8_mc2_mce, .mc2_mce = k8_mc2_mce,
}, },
@ -123,7 +125,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
}; };
static void __decode_amd_mc(enum cputype cpu, struct mce *mce) static void __decode_amd_mc(enum cputype cpu, struct mce *mce)
@@ -672,6 +757,9 @@ @@ -672,6 +757,9 @@ static void __decode_amd_mc(enum cputype
case CPU_F12H: case CPU_F12H:
ops = &fam_ops[AMD_F12H]; ops = &fam_ops[AMD_F12H];
break; break;
@ -133,18 +135,22 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
Eprintf("Huh? What family is it: 0x%x?!\n", cpu); Eprintf("Huh? What family is it: 0x%x?!\n", cpu);
return; return;
--- a/amd.h Index: mcelog-181/amd.h
+++ b/amd.h ===================================================================
@@ -96,4 +96,5 @@ --- mcelog-181.orig/amd.h
+++ mcelog-181/amd.h
@@ -96,4 +96,5 @@ enum rrrr_ids {
case CPU_K8: \ case CPU_K8: \
case CPU_F10H: \ case CPU_F10H: \
case CPU_F11H: \ case CPU_F11H: \
- case CPU_F12H - case CPU_F12H
+ case CPU_F12H: \ + case CPU_F12H: \
+ case CPU_F14H + case CPU_F14H
--- a/mcelog.c Index: mcelog-181/mcelog.c
+++ b/mcelog.c ===================================================================
@@ -232,6 +232,7 @@ --- mcelog-181.orig/mcelog.c
+++ mcelog-181/mcelog.c
@@ -232,6 +232,7 @@ static char *cputype_name[] = {
[CPU_F10H] = "AMD Greyhound", [CPU_F10H] = "AMD Greyhound",
[CPU_F11H] = "AMD Griffin", [CPU_F11H] = "AMD Griffin",
[CPU_F12H] = "AMD Llano", [CPU_F12H] = "AMD Llano",
@ -152,7 +158,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
[CPU_P4] = "Intel P4", [CPU_P4] = "Intel P4",
[CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")", [CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")",
[CPU_DUNNINGTON] = "Intel Xeon 7400 series", [CPU_DUNNINGTON] = "Intel Xeon 7400 series",
@@ -274,6 +275,7 @@ @@ -275,6 +276,7 @@ static struct config_choice cpu_choices[
{ "f10h", CPU_F10H }, { "f10h", CPU_F10H },
{ "f11h", CPU_F11H }, { "f11h", CPU_F11H },
{ "f12h", CPU_F12H }, { "f12h", CPU_F12H },
@ -160,9 +166,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
{ "p4", CPU_P4 }, { "p4", CPU_P4 },
{ "dunnington", CPU_DUNNINGTON }, { "dunnington", CPU_DUNNINGTON },
{ "xeon74xx", CPU_DUNNINGTON }, { "xeon74xx", CPU_DUNNINGTON },
--- a/mcelog.h Index: mcelog-181/mcelog.h
+++ b/mcelog.h ===================================================================
@@ -122,6 +122,7 @@ --- mcelog-181.orig/mcelog.h
+++ mcelog-181/mcelog.h
@@ -122,6 +122,7 @@ enum cputype {
CPU_F10H, CPU_F10H,
CPU_F11H, CPU_F11H,
CPU_F12H, CPU_F12H,

View File

@ -8,9 +8,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
mcelog.h | 1 mcelog.h | 1
4 files changed, 165 insertions(+), 1 deletion(-) 4 files changed, 165 insertions(+), 1 deletion(-)
--- a/amd.c Index: mcelog-181/amd.c
+++ b/amd.c ===================================================================
@@ -72,6 +72,43 @@ --- mcelog-181.orig/amd.c
+++ mcelog-181/amd.c
@@ -72,6 +72,43 @@ static char *nbextendederr[] = {
"L3 Cache LRU Error" "L3 Cache LRU Error"
}; };
@ -54,7 +56,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static const char * const mc4_mce_desc[] = { static const char * const mc4_mce_desc[] = {
"DRAM ECC error detected on the NB", "DRAM ECC error detected on the NB",
"CRC error detected on HT link", "CRC error detected on HT link",
@@ -161,6 +198,8 @@ @@ -161,6 +198,8 @@ enum cputype select_amd_cputype(u32 fami
return CPU_F12H; return CPU_F12H;
case 0x14: case 0x14:
return CPU_F14H; return CPU_F14H;
@ -63,7 +65,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
break; break;
} }
@@ -435,6 +474,53 @@ @@ -435,6 +474,53 @@ static bool cat_mc0_mce(u16 ec, u8 xec)
return ret; return ret;
} }
@ -117,7 +119,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static void decode_mc0_mce(struct amd_decoder_ops *ops, struct mce *m) static void decode_mc0_mce(struct amd_decoder_ops *ops, struct mce *m)
{ {
u16 ec = EC(m->status); u16 ec = EC(m->status);
@@ -481,6 +567,36 @@ @@ -481,6 +567,36 @@ static bool cat_mc1_mce(u16 ec, u8 xec)
return ret; return ret;
} }
@ -154,7 +156,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static void decode_mc1_mce(struct amd_decoder_ops *ops, struct mce *m) static void decode_mc1_mce(struct amd_decoder_ops *ops, struct mce *m)
{ {
u16 ec = EC(m->status); u16 ec = EC(m->status);
@@ -537,6 +653,40 @@ @@ -537,6 +653,40 @@ static bool k8_mc2_mce(u16 ec, u8 xec)
return ret; return ret;
} }
@ -195,7 +197,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static void decode_mc2_mce(struct amd_decoder_ops *ops, struct mce *m) static void decode_mc2_mce(struct amd_decoder_ops *ops, struct mce *m)
{ {
u16 ec = EC(m->status); u16 ec = EC(m->status);
@@ -741,6 +891,12 @@ @@ -741,6 +891,12 @@ struct amd_decoder_ops fam_ops[] = {
.mc1_mce = cat_mc1_mce, .mc1_mce = cat_mc1_mce,
.mc2_mce = k8_mc2_mce, .mc2_mce = k8_mc2_mce,
}, },
@ -208,7 +210,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
}; };
static void __decode_amd_mc(enum cputype cpu, struct mce *mce) static void __decode_amd_mc(enum cputype cpu, struct mce *mce)
@@ -760,6 +916,10 @@ @@ -760,6 +916,10 @@ static void __decode_amd_mc(enum cputype
case CPU_F14H: case CPU_F14H:
ops = &fam_ops[AMD_F14H]; ops = &fam_ops[AMD_F14H];
break; break;
@ -219,18 +221,22 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
Eprintf("Huh? What family is it: 0x%x?!\n", cpu); Eprintf("Huh? What family is it: 0x%x?!\n", cpu);
return; return;
--- a/amd.h Index: mcelog-181/amd.h
+++ b/amd.h ===================================================================
@@ -97,4 +97,5 @@ --- mcelog-181.orig/amd.h
+++ mcelog-181/amd.h
@@ -97,4 +97,5 @@ enum rrrr_ids {
case CPU_F10H: \ case CPU_F10H: \
case CPU_F11H: \ case CPU_F11H: \
case CPU_F12H: \ case CPU_F12H: \
- case CPU_F14H - case CPU_F14H
+ case CPU_F14H: \ + case CPU_F14H: \
+ case CPU_F15H + case CPU_F15H
--- a/mcelog.c Index: mcelog-181/mcelog.c
+++ b/mcelog.c ===================================================================
@@ -233,6 +233,7 @@ --- mcelog-181.orig/mcelog.c
+++ mcelog-181/mcelog.c
@@ -233,6 +233,7 @@ static char *cputype_name[] = {
[CPU_F11H] = "AMD Griffin", [CPU_F11H] = "AMD Griffin",
[CPU_F12H] = "AMD Llano", [CPU_F12H] = "AMD Llano",
[CPU_F14H] = "AMD Bobcat", [CPU_F14H] = "AMD Bobcat",
@ -238,7 +244,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
[CPU_P4] = "Intel P4", [CPU_P4] = "Intel P4",
[CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")", [CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")",
[CPU_DUNNINGTON] = "Intel Xeon 7400 series", [CPU_DUNNINGTON] = "Intel Xeon 7400 series",
@@ -276,6 +277,7 @@ @@ -277,6 +278,7 @@ static struct config_choice cpu_choices[
{ "f11h", CPU_F11H }, { "f11h", CPU_F11H },
{ "f12h", CPU_F12H }, { "f12h", CPU_F12H },
{ "f14h", CPU_F14H }, { "f14h", CPU_F14H },
@ -246,9 +252,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
{ "p4", CPU_P4 }, { "p4", CPU_P4 },
{ "dunnington", CPU_DUNNINGTON }, { "dunnington", CPU_DUNNINGTON },
{ "xeon74xx", CPU_DUNNINGTON }, { "xeon74xx", CPU_DUNNINGTON },
--- a/mcelog.h Index: mcelog-181/mcelog.h
+++ b/mcelog.h ===================================================================
@@ -123,6 +123,7 @@ --- mcelog-181.orig/mcelog.h
+++ mcelog-181/mcelog.h
@@ -123,6 +123,7 @@ enum cputype {
CPU_F11H, CPU_F11H,
CPU_F12H, CPU_F12H,
CPU_F14H, CPU_F14H,

View File

@ -8,9 +8,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
mcelog.h | 1 + mcelog.h | 1 +
4 files changed, 58 insertions(+), 1 deletion(-) 4 files changed, 58 insertions(+), 1 deletion(-)
--- a/amd.c Index: mcelog-181/amd.c
+++ b/amd.c ===================================================================
@@ -200,6 +200,8 @@ --- mcelog-181.orig/amd.c
+++ mcelog-181/amd.c
@@ -200,6 +200,8 @@ enum cputype select_amd_cputype(u32 fami
return CPU_F14H; return CPU_F14H;
case 0x15: case 0x15:
return CPU_F15H; return CPU_F15H;
@ -19,7 +21,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
break; break;
} }
@@ -687,6 +689,47 @@ @@ -687,6 +689,47 @@ static bool f15h_mc2_mce(u16 ec, u8 xec)
return ret; return ret;
} }
@ -67,7 +69,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
static void decode_mc2_mce(struct amd_decoder_ops *ops, struct mce *m) static void decode_mc2_mce(struct amd_decoder_ops *ops, struct mce *m)
{ {
u16 ec = EC(m->status); u16 ec = EC(m->status);
@@ -897,6 +940,12 @@ @@ -897,6 +940,12 @@ struct amd_decoder_ops fam_ops[] = {
.mc1_mce = f15h_mc1_mce, .mc1_mce = f15h_mc1_mce,
.mc2_mce = f15h_mc2_mce, .mc2_mce = f15h_mc2_mce,
}, },
@ -80,7 +82,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
}; };
static void __decode_amd_mc(enum cputype cpu, struct mce *mce) static void __decode_amd_mc(enum cputype cpu, struct mce *mce)
@@ -920,6 +969,10 @@ @@ -920,6 +969,10 @@ static void __decode_amd_mc(enum cputype
xec_mask = 0x1f; xec_mask = 0x1f;
ops = &fam_ops[AMD_F15H]; ops = &fam_ops[AMD_F15H];
break; break;
@ -91,18 +93,22 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
default: default:
Eprintf("Huh? What family is it: 0x%x?!\n", cpu); Eprintf("Huh? What family is it: 0x%x?!\n", cpu);
return; return;
--- a/amd.h Index: mcelog-181/amd.h
+++ b/amd.h ===================================================================
@@ -98,4 +98,5 @@ --- mcelog-181.orig/amd.h
+++ mcelog-181/amd.h
@@ -98,4 +98,5 @@ enum rrrr_ids {
case CPU_F11H: \ case CPU_F11H: \
case CPU_F12H: \ case CPU_F12H: \
case CPU_F14H: \ case CPU_F14H: \
- case CPU_F15H - case CPU_F15H
+ case CPU_F15H: \ + case CPU_F15H: \
+ case CPU_F16H + case CPU_F16H
--- a/mcelog.c Index: mcelog-181/mcelog.c
+++ b/mcelog.c ===================================================================
@@ -234,6 +234,7 @@ --- mcelog-181.orig/mcelog.c
+++ mcelog-181/mcelog.c
@@ -234,6 +234,7 @@ static char *cputype_name[] = {
[CPU_F12H] = "AMD Llano", [CPU_F12H] = "AMD Llano",
[CPU_F14H] = "AMD Bobcat", [CPU_F14H] = "AMD Bobcat",
[CPU_F15H] = "AMD Bulldozer", [CPU_F15H] = "AMD Bulldozer",
@ -110,7 +116,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
[CPU_P4] = "Intel P4", [CPU_P4] = "Intel P4",
[CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")", [CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")",
[CPU_DUNNINGTON] = "Intel Xeon 7400 series", [CPU_DUNNINGTON] = "Intel Xeon 7400 series",
@@ -278,6 +279,7 @@ @@ -279,6 +280,7 @@ static struct config_choice cpu_choices[
{ "f12h", CPU_F12H }, { "f12h", CPU_F12H },
{ "f14h", CPU_F14H }, { "f14h", CPU_F14H },
{ "f15h", CPU_F15H }, { "f15h", CPU_F15H },
@ -118,9 +124,11 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
{ "p4", CPU_P4 }, { "p4", CPU_P4 },
{ "dunnington", CPU_DUNNINGTON }, { "dunnington", CPU_DUNNINGTON },
{ "xeon74xx", CPU_DUNNINGTON }, { "xeon74xx", CPU_DUNNINGTON },
--- a/mcelog.h Index: mcelog-181/mcelog.h
+++ b/mcelog.h ===================================================================
@@ -124,6 +124,7 @@ --- mcelog-181.orig/mcelog.h
+++ mcelog-181/mcelog.h
@@ -124,6 +124,7 @@ enum cputype {
CPU_F12H, CPU_F12H,
CPU_F14H, CPU_F14H,
CPU_F15H, CPU_F15H,

View File

@ -7,14 +7,16 @@
msg.c | 8 ++ msg.c | 8 ++
6 files changed, 346 insertions(+), 3 deletions(-) 6 files changed, 346 insertions(+), 3 deletions(-)
--- a/Makefile Index: mcelog-181/Makefile
+++ b/Makefile ===================================================================
--- mcelog-181.orig/Makefile
+++ mcelog-181/Makefile
@@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
+CONFIG_EMAIL := 1 +CONFIG_EMAIL := 1
CFLAGS := -g -Os CFLAGS := -g -Os
prefix := /usr prefix := /usr
etcprefix := etcprefix :=
@@ -38,15 +39,23 @@ @@ -38,15 +39,23 @@ OBJ := p4.o k8.o mcelog.o dmi.o tsc.o co
broadwell_de.o broadwell_epex.o skylake_xeon.o \ broadwell_de.o broadwell_epex.o skylake_xeon.o \
denverton.o i10nm.o \ denverton.o i10nm.o \
msr.o bus.o unknown.o msr.o bus.o unknown.o
@ -39,7 +41,7 @@
# dbquery intentionally not installed by default # dbquery intentionally not installed by default
install: mcelog mcelog.conf mcelog.conf.5 mcelog.triggers.5 install: mcelog mcelog.conf mcelog.conf.5 mcelog.triggers.5
@@ -81,7 +90,7 @@ @@ -81,7 +90,7 @@ dbquery: db.o dbquery.o memutil.o
depend: .depend depend: .depend
%.o: %.c %.o: %.c
@ -48,8 +50,10 @@
version.tmp: FORCE version.tmp: FORCE
( printf "char version[] = \"" ; \ ( printf "char version[] = \"" ; \
Index: mcelog-181/email.c
===================================================================
--- /dev/null --- /dev/null
+++ b/email.c +++ mcelog-181/email.c
@@ -0,0 +1,200 @@ @@ -0,0 +1,200 @@
+#include <unistd.h> +#include <unistd.h>
+#include <signal.h> +#include <signal.h>
@ -251,8 +255,10 @@
+ smtp_destroy_session (session); + smtp_destroy_session (session);
+ return 0; + return 0;
+} +}
Index: mcelog-181/email.h
===================================================================
--- /dev/null --- /dev/null
+++ b/email.h +++ mcelog-181/email.h
@@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
+#ifndef _MCELOG_EMAIL_H_ +#ifndef _MCELOG_EMAIL_H_
+#define _MCELOG_EMAIL_H_ +#define _MCELOG_EMAIL_H_
@ -288,8 +294,10 @@
+#endif +#endif
+ +
+#endif +#endif
--- a/mcelog.c Index: mcelog-181/mcelog.c
+++ b/mcelog.c ===================================================================
--- mcelog-181.orig/mcelog.c
+++ mcelog-181/mcelog.c
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
#include <assert.h> #include <assert.h>
#include <signal.h> #include <signal.h>
@ -308,7 +316,7 @@
enum cputype cputype = CPU_GENERIC; enum cputype cputype = CPU_GENERIC;
char *logfn = LOG_DEV_FILENAME; char *logfn = LOG_DEV_FILENAME;
@@ -71,7 +75,7 @@ @@ -71,7 +75,7 @@ static double cpumhz;
static int cpumhz_forced; static int cpumhz_forced;
int ascii_mode; int ascii_mode;
int dump_raw_ascii; int dump_raw_ascii;
@ -317,7 +325,7 @@
static char *inputfile; static char *inputfile;
char *processor_flags; char *processor_flags;
static int foreground; static int foreground;
@@ -1022,6 +1026,7 @@ @@ -1024,6 +1028,7 @@ void usage(void)
"--max-corr-err-counters Max page correctable error counters\n" "--max-corr-err-counters Max page correctable error counters\n"
"--help Display this message.\n" "--help Display this message.\n"
); );
@ -325,7 +333,7 @@
printf("\n"); printf("\n");
print_cputypes(); print_cputypes();
} }
@@ -1093,6 +1098,7 @@ @@ -1095,6 +1100,7 @@ static struct option options[] = {
{ "max-corr-err-counters", 1, NULL, O_MAX_CORR_ERR_COUNTERS }, { "max-corr-err-counters", 1, NULL, O_MAX_CORR_ERR_COUNTERS },
{ "help", 0, NULL, O_HELP }, { "help", 0, NULL, O_HELP },
{ "is-cpu-supported", 0, NULL, O_IS_CPU_SUPPORTED }, { "is-cpu-supported", 0, NULL, O_IS_CPU_SUPPORTED },
@ -333,7 +341,7 @@
{} {}
}; };
@@ -1287,11 +1293,86 @@ @@ -1289,11 +1295,86 @@ static void drop_cred(void)
} }
} }
@ -420,7 +428,7 @@
if (recordlen == 0) { if (recordlen == 0) {
Wprintf("no data in mce record\n"); Wprintf("no data in mce record\n");
@@ -1318,12 +1399,16 @@ @@ -1320,12 +1401,16 @@ static void process(int fd, unsigned rec
finish = 1; finish = 1;
if (!mce_filter(mce, recordlen)) if (!mce_filter(mce, recordlen))
continue; continue;
@ -437,7 +445,7 @@
flushlog(); flushlog();
} }
@@ -1437,6 +1522,8 @@ @@ -1439,6 +1524,8 @@ int main(int ac, char **av)
noargs(ac, av); noargs(ac, av);
fprintf(stderr, "mcelog %s\n", MCELOG_VERSION); fprintf(stderr, "mcelog %s\n", MCELOG_VERSION);
exit(0); exit(0);
@ -446,7 +454,7 @@
} else if (opt == 0) } else if (opt == 0)
break; break;
} }
@@ -1471,6 +1558,10 @@ @@ -1473,6 +1560,10 @@ int main(int ac, char **av)
usage(); usage();
exit(1); exit(1);
} }
@ -457,9 +465,11 @@
checkdmi(); checkdmi();
general_setup(); general_setup();
--- a/mcelog.h Index: mcelog-181/mcelog.h
+++ b/mcelog.h ===================================================================
@@ -156,6 +156,7 @@ --- mcelog-181.orig/mcelog.h
+++ mcelog-181/mcelog.h
@@ -157,6 +157,7 @@ enum cputype {
enum option_ranges { enum option_ranges {
O_COMMON = 500, O_COMMON = 500,
O_DISKDB = 1000, O_DISKDB = 1000,
@ -467,8 +477,10 @@
}; };
enum syslog_opt { enum syslog_opt {
--- a/msg.c Index: mcelog-181/msg.c
+++ b/msg.c ===================================================================
--- mcelog-181.orig/msg.c
+++ mcelog-181/msg.c
@@ -8,10 +8,13 @@ @@ -8,10 +8,13 @@
#include "mcelog.h" #include "mcelog.h"
#include "msg.h" #include "msg.h"
@ -483,7 +495,7 @@
static char *output_fn; static char *output_fn;
int need_stdout(void) int need_stdout(void)
@@ -135,6 +138,11 @@ @@ -135,6 +138,11 @@ int Wprintf(char *fmt, ...)
n = vfprintf(output_fh ? output_fh : stdout, fmt, ap); n = vfprintf(output_fh ? output_fh : stdout, fmt, ap);
va_end(ap); va_end(ap);
} }

View File

@ -2,8 +2,10 @@
mcelog.c | 9 +++++++++ mcelog.c | 9 +++++++++
1 file changed, 9 insertions(+) 1 file changed, 9 insertions(+)
--- a/mcelog.c Index: mcelog-181/mcelog.c
+++ b/mcelog.c ===================================================================
--- mcelog-181.orig/mcelog.c
+++ mcelog-181/mcelog.c
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
#include <assert.h> #include <assert.h>
#include <signal.h> #include <signal.h>
@ -12,7 +14,7 @@
#include <sys/wait.h> #include <sys/wait.h>
#include <fnmatch.h> #include <fnmatch.h>
#include "mcelog.h" #include "mcelog.h"
@@ -1284,6 +1285,14 @@ @@ -1286,6 +1287,14 @@ static void general_setup(void)
static void drop_cred(void) static void drop_cred(void)
{ {

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3fd9bbb05025354794092147eae5cab2188cd844aead822b98e0ede0215c46b2
size 636940

3
mcelog-181.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c8bb19a40c1a1a533a952b5b27eaa23dfa0184a89f8f0af0eaa5ac99eb38edc2
size 630284

View File

@ -1,3 +1,38 @@
-------------------------------------------------------------------
Tue May 03 11:32:42 UTC 2022 - moritz.kodytek@suse.com
- Update to version 181:
* mcelog: Add support for Raptorlake
- Adopt patches to latest git version
M Start-consolidating-AMD-specific-stuff.patch
M add-f10h-support.patch
M add-f11h-support.patch
M add-f12h-support.patch
M add-f14h-support.patch
M add-f15h-support.patch
M add-f16h-support.patch
M email.patch
M fix_setgroups_missing_call.patch
M mcelog_invert_prefill_db_warning.patch
- Use Python3 shebang instead of python
A python3_shebang
- Use Github URL
-------------------------------------------------------------------
Wed Apr 13 12:44:57 UTC 2022 - moritz.kodytek@suse.com
- Update to version 180:
* Fix warnings in sysfs.c
* mcelog: Change "DDR4" string to "DDR" for i10nm platforms
* Fix logrotate syntax
* remove outdated mcelog.conf.5 manual file
* add furture print function for Python2
* fix python errors in genconfig.py
* fix the buf not freed in read_field
* mcelog: Print warning for locked down kernel
* mcelog: Handle sysfs files without length
* Fix make test fail
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 01 14:30:27 UTC 2021 - trenn@suse.de Wed Sep 01 14:30:27 UTC 2021 - trenn@suse.de

View File

@ -1,5 +1,4 @@
name: mcelog name: mcelog
version: 178 version: 181
mtime: 1626818514 mtime: 1650316407
commit: c133a744e9ee6a2f40cbec4cfb0182d3ed1a792a commit: a4edca25ef3bd8780ae1dc54bc203973ec7f1640

View File

@ -1,7 +1,7 @@
# #
# spec file for package mcelog # spec file for package mcelog
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2022 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -21,7 +21,7 @@
%define _fillupdir %{_localstatedir}/adm/fillup-templates %define _fillupdir %{_localstatedir}/adm/fillup-templates
%endif %endif
Name: mcelog Name: mcelog
Version: 178 Version: 181
Release: 0 Release: 0
Summary: Log Machine Check Events Summary: Log Machine Check Events
License: GPL-2.0-only License: GPL-2.0-only
@ -44,6 +44,8 @@ Patch9: patches/add-f15h-support.patch
Patch10: patches/add-f16h-support.patch Patch10: patches/add-f16h-support.patch
Patch11: mcelog-socket-path.patch Patch11: mcelog-socket-path.patch
Patch12: fix_setgroups_missing_call.patch Patch12: fix_setgroups_missing_call.patch
Patch13: python3_shebang
BuildRequires: %{pythons}
BuildRequires: libesmtp-devel BuildRequires: libesmtp-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)

View File

@ -2,9 +2,11 @@
memdb.c | 10 +++++----- memdb.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-) 1 file changed, 5 insertions(+), 5 deletions(-)
--- a/memdb.c Index: mcelog-181/memdb.c
+++ b/memdb.c ===================================================================
@@ -431,11 +431,11 @@ --- mcelog-181.orig/memdb.c
+++ mcelog-181/memdb.c
@@ -431,11 +431,11 @@ void prefill_memdb(int do_dmi)
md->location = xstrdup(bl); md->location = xstrdup(bl);
md->name = xstrdup(dmi_getstring(&d->header, d->device_locator)); md->name = xstrdup(dmi_getstring(&d->header, d->device_locator));
} }

13
python3_shebang Normal file
View File

@ -0,0 +1,13 @@
Index: mcelog-181/genconfig.py
===================================================================
--- mcelog-181.orig/genconfig.py
+++ mcelog-181/genconfig.py
@@ -1,7 +1,6 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# generate man config documentation from mcelog.conf example
# genconfig.py mcelog.conf intro.html
-from __future__ import print_function
import sys
import re
import argparse