Hello community,
here is the log from the commit of package mcelog
checked in at Tue May 9 00:41:08 CEST 2006.
--------
--- arch/x86_64/mcelog/mcelog.changes 2006-03-03 20:22:08.000000000 +0100
+++ STABLE/mcelog/mcelog.changes 2006-05-05 19:10:42.000000000 +0200
@@ -1,0 +2,7 @@
+Fri May 5 19:00:23 CEST 2006 - ak@suse.de
+
+- Update to 0.7. This fixes
+ - Fix --dmi option (#166324)
+ - Incorporate old patches
+
+-------------------------------------------------------------------
Old:
----
mce-filter-fix
mcelog-0.6.tar.gz
New:
----
mcelog-0.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mcelog.spec ++++++
--- /var/tmp/diff_new_pack.u8mcN6/_old 2006-05-09 00:40:55.000000000 +0200
+++ /var/tmp/diff_new_pack.u8mcN6/_new 2006-05-09 00:40:55.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package mcelog (Version 0.6)
+# spec file for package mcelog (Version 0.7)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,13 +13,12 @@
Name: mcelog
License: GPL
Summary: Log Machine Check Events
-Version: 0.6
-Release: 3
+Version: 0.7
+Release: 2
Autoreqprov: on
Source: mcelog-%{version}.tar.gz
Group: System/Monitoring
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Patch0: mce-filter-fix
%description
mcelog retrieves machine check events from an x86-64 kernel in a cron
@@ -39,7 +38,6 @@
%prep
%setup
-%patch0 -p0
%build
make CFLAGS="$RPM_OPT_FLAGS"
@@ -65,6 +63,10 @@
/etc/logrotate.d/mcelog
%changelog -n mcelog
+* Fri May 05 2006 - ak@suse.de
+- Update to 0.7. This fixes
+- Fix --dmi option (#166324)
+- Incorporate old patches
* Fri Mar 03 2006 - ak@suse.de
- Avoid cosmetic problem in --filter (#153347)
* Wed Feb 08 2006 - ak@suse.de
++++++ mcelog-0.6.tar.gz -> mcelog-0.7.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mcelog-0.6/CHANGES new/mcelog-0.7/CHANGES
--- old/mcelog-0.6/CHANGES 2006-02-08 14:26:40.000000000 +0100
+++ new/mcelog-0.7/CHANGES 2006-05-03 08:55:54.000000000 +0200
@@ -1,5 +1,9 @@
<newer changes first>
+Allow modifier command line options after --ascii
+Don't print decoded address twice for --ascii
+Fix SMBIOS anchor scan to work on more machines and don't crash when
+ no anchor found.
Fix --ascii reparsing of mcelog output.
Add --filter and filter out known broken K8 GART errors
Add --ignorenodev argument and use in cron script (avoids cron errors
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mcelog-0.6/dmi.c new/mcelog-0.7/dmi.c
--- old/mcelog-0.6/dmi.c 2006-02-08 14:26:40.000000000 +0100
+++ new/mcelog-0.7/dmi.c 2006-05-03 08:55:54.000000000 +0200
@@ -22,6 +22,7 @@
add an option to dump existing errors in SMBIOS?
implement code to look up PCI resources too.
*/
+#define _GNU_SOURCE 1
#include
#include
#include
@@ -42,13 +43,21 @@
int verbose = 0;
struct anchor {
- char str[5]; /* _DMI_ */
+ char str[4]; /* _SM_ */
char csum;
+ char entry_length;
+ char major;
+ char minor;
+ short maxlength;
+ char rev;
+ char fmt[5];
+ char str2[5]; /* _DMI_ */
+ char csum2;
short length;
unsigned table;
unsigned short numentries;
char bcdrev;
-};
+} __attribute__((packed));
struct dmi_entry {
unsigned char type;
@@ -174,22 +183,21 @@
}
struct anchor *a, *abase;
- abase = mmap(NULL, 0x10000, PROT_READ, MAP_SHARED, memfd, 0xf0000);
+ abase = mmap(NULL, 0xffff, PROT_READ, MAP_SHARED, memfd, 0xf0000);
if (abase == (struct anchor *)-1) {
fprintf(stderr, "Cannot mmap 0xf0000: %s\n", strerror(errno));
return -1;
}
- int found = 0;
- for (a = abase; a < (struct anchor *)((char *)abase + 0xfffff); a++) {
- if (!memcmp(a->str, "_DMI_", 5) &&
- checksum((unsigned char *)a, 16) == 0) {
- found = 1;
+
+ a = abase;
+ for (a = abase;;a += 4) {
+ a = memmem(a, 0xffff, "_SM_", 4);
+ if (!a) {
+ fprintf(stderr, "Cannot find SMBIOS DMI tables\n");
+ return -1;
+ }
+ if (checksum((unsigned char *)a, a->entry_length) == 0)
break;
- }
- }
- if (!found) {
- fprintf(stderr, "Cannot find SMBIOS DMI tables\n");
- return -1;
}
if (verbose)
printf("DMI tables at %x, %u bytes, %u entries\n",
@@ -237,7 +245,7 @@
"SDRAM", "SGRAM", "RDRAM", "DDR", "DDR2"
};
-#define LOOKUP(array, val) ((val) >= NELE(array) ? "Out of range" : (array)[val])
+#define LOOKUP(array, val, buf) ((val) >= NELE(array) ? (sprintf(buf,"<%u>",(val)), (buf)) : (array)[val])
static char *type_details[16] = {
"Reserved", "Other", "Unknown", "Fast-paged", "Static Column",
@@ -257,6 +265,7 @@
void dump_memdev(unsigned handle, unsigned long addr)
{
+ char tmp[20];
struct dmi_memdev *md = (struct dmi_memdev *)handle_to_entry[handle];
if (!md) {
Wprintf("Cannot resolve memory device %x for %lx\n",
@@ -271,9 +280,9 @@
return;
}
char unit[10];
- Wprintf("%s ", LOOKUP(memory_types, md->memory_type));
+ Wprintf("%s ", LOOKUP(memory_types, md->memory_type, tmp));
if (md->form_factor >= 3)
- Wprintf("%s ", LOOKUP(form_factors, md->form_factor));
+ Wprintf("%s ", LOOKUP(form_factors, md->form_factor, tmp));
if (md->speed != 0)
Wprintf("%hu Mhz ", md->speed);
dump_type_details(md->type_details);
@@ -285,7 +294,7 @@
#define DUMPSTR(n,x) \
if (md->x) { \
s = getstring(&md->header, md->x); \
- if (s) \
+ if (s && strcmp(s,"None")) \
Wprintf(n ": %s\n", s); \
}
DUMPSTR("Device Locator", device_locator);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/mcelog-0.6/mcelog.c new/mcelog-0.7/mcelog.c
--- old/mcelog-0.6/mcelog.c 2006-02-08 14:26:40.000000000 +0100
+++ new/mcelog-0.7/mcelog.c 2006-05-03 08:55:54.000000000 +0200
@@ -83,7 +83,7 @@
/* Filter out GART errors */
if (m->bank == 4) {
unsigned short exterrcode = (m->status >> 16) & 0x0f;
- if (exterrcode == 5 && (m->status & (1UL<<61)))
+ if (exterrcode == 5 && (m->status & (1ULL<<61)))
return 0;
}
return 1;
@@ -109,9 +109,6 @@
void dump_mce(struct mce *m)
{
- if (!mce_filter(m))
- return;
-
Wprintf("HARDWARE ERROR. This is *NOT* a software problem!\n");
Wprintf("Please contact your hardware vendor\n");
/* should not happen */
@@ -123,8 +120,6 @@
m->tsc,
(m->mcgstatus & MCI_STATUS_UC) ?
"(upper bound, found by polled driver)" : "");
- else
- Wprintf("from boot or resume\n");
if (m->rip)
Wprintf("RIP%s %02x:%Lx ",
!(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "",
@@ -284,7 +279,6 @@
else if (!strncmp(s, "ADDR",4)) {
if ((n = sscanf(s, "ADDR %Lx", &m.addr)) != 1)
missing++;
- resolveaddr(m.addr);
}
else if (!strncmp(s, "MISC",4)) {
if ((n = sscanf(s, "MISC %Lx", &m.misc)) != 1)
@@ -316,6 +310,29 @@
exit(1);
}
+int modifier(char *s)
+{
+ if (!strcmp(s, "--k8")) {
+ cpu = CPU_K8;
+ } else if (!strcmp(s, "--p4")) {
+ cpu = CPU_P4;
+ } else if (!strcmp(s, "--generic")) {
+ cpu = CPU_GENERIC;
+ } else if (!strcmp(s, "--ignorenodev")) {
+ ignore_nodev = 1;
+ } else if (!strcmp(s,"--filter")) {
+ filter_bogus = 1;
+ } else if (!strcmp(s, "--dmi")) {
+ do_dmi = 1;
+ opendmi();
+ } else if (!strcmp(s, "--syslog")) {
+ openlog("mcelog", 0, LOG_DAEMON);
+ use_syslog = 1;
+ } else
+ return 0;
+ return 1;
+}
+
int main(int ac, char **av)
{
int recordlen = 0;
@@ -324,27 +341,15 @@
check_cpu();
while (*++av) {
- if (!strcmp(*av, "--syslog")) {
- openlog("mcelog", 0, LOG_DAEMON);
- use_syslog = 1;
- } else if (!strcmp(*av, "--k8")) {
- cpu = CPU_K8;
- } else if (!strcmp(*av, "--p4")) {
- cpu = CPU_P4;
- } else if (!strcmp(*av, "--generic")) {
- cpu = CPU_GENERIC;
+ if (modifier(*av)) {
+ /* ok */
} else if (!strcmp(*av, "--ascii")) {
- if (av[1])
- usage();
+ while (*++av) {
+ if (!modifier(*av))
+ usage();
+ }
decodefatal(stdin);
exit(0);
- } else if (!strcmp(*av, "--ignorenodev")) {
- ignore_nodev = 1;
- } else if (!strcmp(*av, "--dmi")) {
- do_dmi = 1;
- opendmi();
- } else if (!strcmp(*av,"--filter")) {
- filter_bogus = 1;
} else if (!strncmp(*av, "--", 2)) {
if (av[0][2] == '\0')
break;
@@ -384,6 +389,8 @@
int i;
for (i = 0; i < len / recordlen; i++) {
struct mce *mce = (struct mce *)(buf + i*recordlen);
+ if (!mce_filter(mce))
+ continue;
printf("MCE %d\n", i);
dump_mce(mce);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...