mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][2.5] Add TAINT_UNKNOWN_STATE
@ 2002-11-21  7:55 Zwane Mwaikambo
  2002-11-21  7:59 ` Zwane Mwaikambo
  2002-11-21 13:00 ` Dave Jones
  0 siblings, 2 replies; 4+ messages in thread
From: Zwane Mwaikambo @ 2002-11-21  7:55 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Andrew Morton, Alan Cox

Hi,
	I've come across some bugs on my test rig where the oops didn't 
make any sense at all, after trawling through a couple of megs of debug 
output in the logs i came across the previous oops... This is only after
spending a considerable amount of time trying to make sense of a useless 
oops. I also think this would be of use when handling general bug 
reports, this way we'd be able to determine wether the system was in an 
uknown state when the oops was dumped, and perhaps try and get further 
information from the bug reporter.

	Zwane

Index: linux-2.5.48/include/linux/kernel.h
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/include/linux/kernel.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 kernel.h
--- linux-2.5.48/include/linux/kernel.h	18 Nov 2002 05:11:13 -0000	1.1.1.1
+++ linux-2.5.48/include/linux/kernel.h	20 Nov 2002 06:29:39 -0000
@@ -103,6 +103,7 @@
 #define TAINT_FORCED_MODULE		(1<<1)
 #define TAINT_UNSAFE_SMP		(1<<2)
 #define TAINT_FORCED_RMMOD		(1<<3)
+#define TAINT_UNKNOWN_STATE		(1<<4)
 
 extern void dump_stack(void);
 
Index: linux-2.5.48/kernel/panic.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/kernel/panic.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 panic.c
--- linux-2.5.48/kernel/panic.c	18 Nov 2002 05:13:12 -0000	1.1.1.1
+++ linux-2.5.48/kernel/panic.c	21 Nov 2002 07:30:10 -0000
@@ -114,10 +114,11 @@
 {
 	static char buf[20];
 	if (tainted) {
-		snprintf(buf, sizeof(buf), "Tainted: %c%c%c",
+		snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c",
 			tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G',
 			tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
-			tainted & TAINT_UNSAFE_SMP ? 'S' : ' ');
+			tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
+			tainted & TAINT_UNKNOWN_STATE ? 'U' : ' ');
 	}
 	else
 		snprintf(buf, sizeof(buf), "Not tainted");
Index: linux-2.5.48/arch/i386/mm/fault.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/arch/i386/mm/fault.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fault.c
--- linux-2.5.48/arch/i386/mm/fault.c	18 Nov 2002 05:11:52 -0000	1.1.1.1
+++ linux-2.5.48/arch/i386/mm/fault.c	21 Nov 2002 06:46:43 -0000
@@ -135,6 +135,7 @@
 	console_loglevel = 15;		/* NMI oopser may have shut the console up */
 	printk(" ");
 	console_loglevel = loglevel_save;
+	tainted |= TAINT_UNKNOWN_STATE;	/* flag that we've gone through one oops 'U' */
 }
 
 asmlinkage void do_invalid_op(struct pt_regs *, unsigned long);
-- 
function.linuxpower.ca


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

* Re: [PATCH][2.5] Add TAINT_UNKNOWN_STATE
  2002-11-21  7:55 [PATCH][2.5] Add TAINT_UNKNOWN_STATE Zwane Mwaikambo
@ 2002-11-21  7:59 ` Zwane Mwaikambo
  2002-11-21 13:00 ` Dave Jones
  1 sibling, 0 replies; 4+ messages in thread
From: Zwane Mwaikambo @ 2002-11-21  7:59 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Andrew Morton, Alan Cox

On Thu, 21 Nov 2002, Zwane Mwaikambo wrote:

> Hi,
> 	I've come across some bugs on my test rig where the oops didn't 
> make any sense at all, after trawling through a couple of megs of debug 
> output in the logs i came across the previous oops... This is only after
> spending a considerable amount of time trying to make sense of a useless 
> oops. I also think this would be of use when handling general bug 
> reports, this way we'd be able to determine wether the system was in an 
> uknown state when the oops was dumped, and perhaps try and get further 
> information from the bug reporter.

Missed one;

Index: linux-2.5.48/include/linux/kernel.h
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/include/linux/kernel.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 kernel.h
--- linux-2.5.48/include/linux/kernel.h	18 Nov 2002 05:11:13 -0000	1.1.1.1
+++ linux-2.5.48/include/linux/kernel.h	20 Nov 2002 06:29:39 -0000
@@ -103,6 +103,7 @@
 #define TAINT_FORCED_MODULE		(1<<1)
 #define TAINT_UNSAFE_SMP		(1<<2)
 #define TAINT_FORCED_RMMOD		(1<<3)
+#define TAINT_UNKNOWN_STATE		(1<<4)
 
 extern void dump_stack(void);
 
Index: linux-2.5.48/kernel/panic.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/kernel/panic.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 panic.c
--- linux-2.5.48/kernel/panic.c	18 Nov 2002 05:13:12 -0000	1.1.1.1
+++ linux-2.5.48/kernel/panic.c	21 Nov 2002 07:30:10 -0000
@@ -114,10 +114,11 @@
 {
 	static char buf[20];
 	if (tainted) {
-		snprintf(buf, sizeof(buf), "Tainted: %c%c%c",
+		snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c",
 			tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G',
 			tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
-			tainted & TAINT_UNSAFE_SMP ? 'S' : ' ');
+			tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
+			tainted & TAINT_UNKNOWN_STATE ? 'U' : ' ');
 	}
 	else
 		snprintf(buf, sizeof(buf), "Not tainted");
Index: linux-2.5.48/arch/i386/mm/fault.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/arch/i386/mm/fault.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fault.c
--- linux-2.5.48/arch/i386/mm/fault.c	18 Nov 2002 05:11:52 -0000	1.1.1.1
+++ linux-2.5.48/arch/i386/mm/fault.c	21 Nov 2002 06:46:43 -0000
@@ -135,6 +135,7 @@
 	console_loglevel = 15;		/* NMI oopser may have shut the console up */
 	printk(" ");
 	console_loglevel = loglevel_save;
+	tainted |= TAINT_UNKNOWN_STATE;	/* flag that we've gone through one oops 'U' */
 }
 
 asmlinkage void do_invalid_op(struct pt_regs *, unsigned long);
Index: linux-2.5.48/lib/bust_spinlocks.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/lib/bust_spinlocks.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 bust_spinlocks.c
--- linux-2.5.48/lib/bust_spinlocks.c	18 Nov 2002 05:12:57 -0000	1.1.1.1
+++ linux-2.5.48/lib/bust_spinlocks.c	21 Nov 2002 06:46:12 -0000
@@ -34,6 +34,7 @@
 		printk(" ");
 		console_loglevel = loglevel_save;
 	}
+	tainted |= TAINT_UNKNOWN_STATE;	/* flag that we've gone through one oops 'U' */
 }
 
 
-- 
function.linuxpower.ca


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

* Re: [PATCH][2.5] Add TAINT_UNKNOWN_STATE
  2002-11-21  7:55 [PATCH][2.5] Add TAINT_UNKNOWN_STATE Zwane Mwaikambo
  2002-11-21  7:59 ` Zwane Mwaikambo
@ 2002-11-21 13:00 ` Dave Jones
  2002-11-21 13:15   ` Zwane Mwaikambo
  1 sibling, 1 reply; 4+ messages in thread
From: Dave Jones @ 2002-11-21 13:00 UTC (permalink / raw)
  To: Zwane Mwaikambo; +Cc: Linux Kernel, Andrew Morton, Alan Cox

On Thu, Nov 21, 2002 at 02:55:44AM -0500, Zwane Mwaikambo wrote:
 > --- linux-2.5.48/include/linux/kernel.h	18 Nov 2002 05:11:13 -0000	1.1.1.1
 > +++ linux-2.5.48/include/linux/kernel.h	20 Nov 2002 06:29:39 -0000
 > @@ -103,6 +103,7 @@
 >  #define TAINT_FORCED_MODULE		(1<<1)
 >  #define TAINT_UNSAFE_SMP		(1<<2)
 >  #define TAINT_FORCED_RMMOD		(1<<3)
 > +#define TAINT_UNKNOWN_STATE		(1<<4)
 >  
 >  extern void dump_stack(void);
 >  
 > Index: linux-2.5.48/kernel/panic.c
 > ===================================================================
 > RCS file: /build/cvsroot/linux-2.5.48/kernel/panic.c,v
 > retrieving revision 1.1.1.1
 > diff -u -r1.1.1.1 panic.c
 > --- linux-2.5.48/kernel/panic.c	18 Nov 2002 05:13:12 -0000	1.1.1.1
 > +++ linux-2.5.48/kernel/panic.c	21 Nov 2002 07:30:10 -0000
 > @@ -114,10 +114,11 @@
 >  {
 >  	static char buf[20];
 >  	if (tainted) {
 > -		snprintf(buf, sizeof(buf), "Tainted: %c%c%c",
 > +		snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c",
 >  			tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G',
 >  			tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
 > -			tainted & TAINT_UNSAFE_SMP ? 'S' : ' ');
 > +			tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
 > +			tainted & TAINT_UNKNOWN_STATE ? 'U' : ' ');
 >  	}

 While you're in panic.c, want to add the missing flag for 
 TAINT_FORCED_RMMOD that Rusty missed ? Maybe 'R' ?

		Dave
		 
-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs

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

* Re: [PATCH][2.5] Add TAINT_UNKNOWN_STATE
  2002-11-21 13:00 ` Dave Jones
@ 2002-11-21 13:15   ` Zwane Mwaikambo
  0 siblings, 0 replies; 4+ messages in thread
From: Zwane Mwaikambo @ 2002-11-21 13:15 UTC (permalink / raw)
  To: Dave Jones; +Cc: Linux Kernel, Andrew Morton, Alan Cox

On Thu, 21 Nov 2002, Dave Jones wrote:

>  While you're in panic.c, want to add the missing flag for 
>  TAINT_FORCED_RMMOD that Rusty missed ? Maybe 'R' ?

Sure...

Index: linux-2.5.48/include/linux/kernel.h
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/include/linux/kernel.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 kernel.h
--- linux-2.5.48/include/linux/kernel.h	18 Nov 2002 05:11:13 -0000	1.1.1.1
+++ linux-2.5.48/include/linux/kernel.h	20 Nov 2002 06:29:39 -0000
@@ -103,6 +103,7 @@
 #define TAINT_FORCED_MODULE		(1<<1)
 #define TAINT_UNSAFE_SMP		(1<<2)
 #define TAINT_FORCED_RMMOD		(1<<3)
+#define TAINT_UNKNOWN_STATE		(1<<4)
 
 extern void dump_stack(void);
 
Index: linux-2.5.48/kernel/panic.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/kernel/panic.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 panic.c
--- linux-2.5.48/kernel/panic.c	18 Nov 2002 05:13:12 -0000	1.1.1.1
+++ linux-2.5.48/kernel/panic.c	21 Nov 2002 13:10:35 -0000
@@ -114,10 +114,12 @@
 {
 	static char buf[20];
 	if (tainted) {
-		snprintf(buf, sizeof(buf), "Tainted: %c%c%c",
+		snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c",
 			tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G',
 			tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
-			tainted & TAINT_UNSAFE_SMP ? 'S' : ' ');
+			tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
+			tainted & TAINT_FORCED_RMMOD ? 'R' : ' ',
+			tainted & TAINT_UNKNOWN_STATE ? 'U' : ' ');
 	}
 	else
 		snprintf(buf, sizeof(buf), "Not tainted");
Index: linux-2.5.48/arch/i386/mm/fault.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/arch/i386/mm/fault.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 fault.c
--- linux-2.5.48/arch/i386/mm/fault.c	18 Nov 2002 05:11:52 -0000	1.1.1.1
+++ linux-2.5.48/arch/i386/mm/fault.c	21 Nov 2002 06:46:43 -0000
@@ -135,6 +135,7 @@
 	console_loglevel = 15;		/* NMI oopser may have shut the console up */
 	printk(" ");
 	console_loglevel = loglevel_save;
+	tainted |= TAINT_UNKNOWN_STATE;	/* flag that we've gone through one oops 'U' */
 }
 
 asmlinkage void do_invalid_op(struct pt_regs *, unsigned long);
Index: linux-2.5.48/lib/bust_spinlocks.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.48/lib/bust_spinlocks.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 bust_spinlocks.c
--- linux-2.5.48/lib/bust_spinlocks.c	18 Nov 2002 05:12:57 -0000	1.1.1.1
+++ linux-2.5.48/lib/bust_spinlocks.c	21 Nov 2002 06:46:12 -0000
@@ -34,6 +34,7 @@
 		printk(" ");
 		console_loglevel = loglevel_save;
 	}
+	tainted |= TAINT_UNKNOWN_STATE;	/* flag that we've gone through one oops 'U' */
 }
 
 
-- 
function.linuxpower.ca


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

end of thread, other threads:[~2002-11-21 13:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-21  7:55 [PATCH][2.5] Add TAINT_UNKNOWN_STATE Zwane Mwaikambo
2002-11-21  7:59 ` Zwane Mwaikambo
2002-11-21 13:00 ` Dave Jones
2002-11-21 13:15   ` Zwane Mwaikambo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®