LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] corruption checker: print the DMI board name
@ 2008-10-29 16:17 Arjan van de Ven
  2008-10-29 16:27 ` [PATCH] corruption checker: print the DMI board name on corruption Arjan van de Ven
  2008-10-30 11:06 ` [PATCH] corruption checker: print the DMI board name Pavel Machek
  0 siblings, 2 replies; 5+ messages in thread
From: Arjan van de Ven @ 2008-10-29 16:17 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel


>From 4f829eef5a31b68a0cbaf83a75ac8b0a1ed05afb Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Wed, 29 Oct 2008 09:13:23 -0700
Subject: [PATCH] corruption checker: print the DMI board name

when the memory corruptor checker hits (as it has done now based on kerneloops.org data),
it would be extremely useful to know the DMI board name so we can add a blacklist for
such a machine... without having to ask the user for lots of extra info.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
 arch/x86/kernel/check.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
index 2ac0ab7..f952182 100644
--- a/arch/x86/kernel/check.c
+++ b/arch/x86/kernel/check.c
@@ -2,6 +2,7 @@
 #include <linux/sched.h>
 #include <linux/kthread.h>
 #include <linux/workqueue.h>
+#include <linux/dmi.h>
 #include <asm/e820.h>
 #include <asm/proto.h>
 
@@ -113,6 +114,7 @@ void check_for_bios_corruption(void)
 {
 	int i;
 	int corruption = 0;
+	const char *board;
 
 	if (!memory_corruption_check)
 		return;
@@ -131,7 +133,11 @@ void check_for_bios_corruption(void)
 		}
 	}
 
-	WARN_ONCE(corruption, KERN_ERR "Memory corruption detected in low memory\n");
+	board = dmi_get_system_info(DMI_PRODUCT_NAME);
+	if (!board)
+		board = "";
+	WARN_ONCE(corruption, KERN_ERR "Memory corruption detected in low memory\nBoard name: %s\n",
+		board);
 }
 
 static void check_corruption(struct work_struct *dummy);
-- 
1.5.5.1


-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] corruption checker: print the DMI board name on corruption
  2008-10-29 16:17 [PATCH] corruption checker: print the DMI board name Arjan van de Ven
@ 2008-10-29 16:27 ` Arjan van de Ven
  2008-10-29 16:36   ` Ingo Molnar
  2008-10-30 11:06 ` [PATCH] corruption checker: print the DMI board name Pavel Machek
  1 sibling, 1 reply; 5+ messages in thread
From: Arjan van de Ven @ 2008-10-29 16:27 UTC (permalink / raw)
  To: torvalds; +Cc: mingo, linux-kernel

Hi Linus,

would you consider merging this patch for 2.6.28 still?
Without this patch, kerneloops.org only gets to see THAT corruption
happens, but doesn't have information about what kind of system the
corruption is happening on.. (which is the useful part to make a
DMI blacklist).

So far we have 1 such report in kerneloops.org but it's useless... no
system information.



>From c66993517ac861964d6968d3672f88b3b69e29ce Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Wed, 29 Oct 2008 09:24:44 -0700
Subject: [PATCH] corruption checker: print the DMI board name on corruption

when the memory corruptor checker hits (as it has done now based on
kerneloops.org data), it would be extremely useful to know the DMI board
name so we can add a blacklist for such a machine... without having to ask
the user for lots of extra info.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
 arch/x86/kernel/setup.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 0fa6790..d57fee2 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -697,6 +697,7 @@ void check_for_bios_corruption(void)
 {
 	int i;
 	int corruption = 0;
+	const char *board;
 
 	if (!memory_corruption_check)
 		return;
@@ -715,7 +716,11 @@ void check_for_bios_corruption(void)
 		}
 	}
 
-	WARN(corruption, KERN_ERR "Memory corruption detected in low memory\n");
+	board = dmi_get_system_info(DMI_PRODUCT_NAME);
+	if (!board)
+		board = "";
+	WARN_ONCE(corruption, KERN_ERR "Memory corruption detected in low memory\nBoard name: %s\n",
+		board);
 }
 
 static void periodic_check_for_corruption(unsigned long data)
-- 
1.5.5.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] corruption checker: print the DMI board name on corruption
  2008-10-29 16:27 ` [PATCH] corruption checker: print the DMI board name on corruption Arjan van de Ven
@ 2008-10-29 16:36   ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-10-29 16:36 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: torvalds, linux-kernel


* Arjan van de Ven <arjan@infradead.org> wrote:

> Hi Linus,
> 
> would you consider merging this patch for 2.6.28 still?
> Without this patch, kerneloops.org only gets to see THAT corruption
> happens, but doesn't have information about what kind of system the
> corruption is happening on.. (which is the useful part to make a
> DMI blacklist).
> 
> So far we have 1 such report in kerneloops.org but it's useless... no
> system information.

such "improve our kerneloops.org yield" patches are fair game up to 
-rc7 or so i think.

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] corruption checker: print the DMI board name
  2008-10-29 16:17 [PATCH] corruption checker: print the DMI board name Arjan van de Ven
  2008-10-29 16:27 ` [PATCH] corruption checker: print the DMI board name on corruption Arjan van de Ven
@ 2008-10-30 11:06 ` Pavel Machek
  2008-10-30 13:28   ` Arjan van de Ven
  1 sibling, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2008-10-30 11:06 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: mingo, linux-kernel

> 
> >From 4f829eef5a31b68a0cbaf83a75ac8b0a1ed05afb Mon Sep 17 00:00:00 2001
> From: Arjan van de Ven <arjan@linux.intel.com>
> Date: Wed, 29 Oct 2008 09:13:23 -0700
> Subject: [PATCH] corruption checker: print the DMI board name
> 
> when the memory corruptor checker hits (as it has done now based on kerneloops.org data),
> it would be extremely useful to know the DMI board name so we can add a blacklist for
> such a machine... without having to ask the user for lots of extra info.

I'm not sure if blacklisting whole brand for one case of bit
corruption is fair -- perhaps the memory was overheating?

  
> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>

But ACK -- we certainly want to see the data.

> ---
>  arch/x86/kernel/check.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
> index 2ac0ab7..f952182 100644
> --- a/arch/x86/kernel/check.c
> +++ b/arch/x86/kernel/check.c
> @@ -2,6 +2,7 @@
>  #include <linux/sched.h>
>  #include <linux/kthread.h>
>  #include <linux/workqueue.h>
> +#include <linux/dmi.h>
>  #include <asm/e820.h>
>  #include <asm/proto.h>
>  
> @@ -113,6 +114,7 @@ void check_for_bios_corruption(void)
>  {
>  	int i;
>  	int corruption = 0;
> +	const char *board;
>  
>  	if (!memory_corruption_check)
>  		return;
> @@ -131,7 +133,11 @@ void check_for_bios_corruption(void)
>  		}
>  	}
>  
> -	WARN_ONCE(corruption, KERN_ERR "Memory corruption detected in low memory\n");
> +	board = dmi_get_system_info(DMI_PRODUCT_NAME);
> +	if (!board)
> +		board = "";
> +	WARN_ONCE(corruption, KERN_ERR "Memory corruption detected in low memory\nBoard name: %s\n",
> +		board);
>  }
>  
>  static void check_corruption(struct work_struct *dummy);

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] corruption checker: print the DMI board name
  2008-10-30 11:06 ` [PATCH] corruption checker: print the DMI board name Pavel Machek
@ 2008-10-30 13:28   ` Arjan van de Ven
  0 siblings, 0 replies; 5+ messages in thread
From: Arjan van de Ven @ 2008-10-30 13:28 UTC (permalink / raw)
  To: Pavel Machek; +Cc: mingo, linux-kernel

On Thu, 30 Oct 2008 12:06:53 +0100
Pavel Machek <pavel@suse.cz> wrote:

> > 
> > >From 4f829eef5a31b68a0cbaf83a75ac8b0a1ed05afb Mon Sep 17 00:00:00
> > >2001
> > From: Arjan van de Ven <arjan@linux.intel.com>
> > Date: Wed, 29 Oct 2008 09:13:23 -0700
> > Subject: [PATCH] corruption checker: print the DMI board name
> > 
> > when the memory corruptor checker hits (as it has done now based on
> > kerneloops.org data), it would be extremely useful to know the DMI
> > board name so we can add a blacklist for such a machine... without
> > having to ask the user for lots of extra info.
> 
> I'm not sure if blacklisting whole brand for one case of bit
> corruption is fair -- perhaps the memory was overheating?

this is where kerneloops.org comes in; we can separate the "happens a
lot" from "happens on blue moons"

> 
>   
> > Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
> 
> But ACK -- we certainly want to see the data.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-30 13:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-29 16:17 [PATCH] corruption checker: print the DMI board name Arjan van de Ven
2008-10-29 16:27 ` [PATCH] corruption checker: print the DMI board name on corruption Arjan van de Ven
2008-10-29 16:36   ` Ingo Molnar
2008-10-30 11:06 ` [PATCH] corruption checker: print the DMI board name Pavel Machek
2008-10-30 13:28   ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).