* [PATCH] lib: Taint kernel in common report_bug() WARN path.
@ 2008-05-16 5:21 Paul Mundt
2008-05-16 14:57 ` Kyle McMartin
0 siblings, 1 reply; 2+ messages in thread
From: Paul Mundt @ 2008-05-16 5:21 UTC (permalink / raw)
To: Andrew Morton
Cc: hskinnemoen, nurhussein, linux-kernel, randy.dunlap, arjan, mingo,
a.p.zijlstra, kyle, schwidefsky
Commit 95b570c9cef3b12356454c7112571b7e406b4b51 introduced a
TAINT_WARN that was implemented for all architectures using the
generic warn_on_slowpath(), which excluded any architecture that
set HAVE_ARCH_WARN_ON.
As all of the architectures that implement their own WARN_ON()
all go through the report_bug() path (specifically handling
BUG_TRAP_TYPE_WARN), taint the kernel there as well for consistency.
Tested on avr32 and sh. Also relevant for s390, parisc, and powerpc.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
---
diff --git a/lib/bug.c b/lib/bug.c
index 530f38f..bfeafd6 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -37,6 +37,7 @@
*/
#include <linux/list.h>
#include <linux/module.h>
+#include <linux/kernel.h>
#include <linux/bug.h>
#include <linux/sched.h>
@@ -149,6 +150,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
(void *)bugaddr);
show_regs(regs);
+ add_taint(TAINT_WARN);
return BUG_TRAP_TYPE_WARN;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] lib: Taint kernel in common report_bug() WARN path.
2008-05-16 5:21 [PATCH] lib: Taint kernel in common report_bug() WARN path Paul Mundt
@ 2008-05-16 14:57 ` Kyle McMartin
0 siblings, 0 replies; 2+ messages in thread
From: Kyle McMartin @ 2008-05-16 14:57 UTC (permalink / raw)
To: Paul Mundt, Andrew Morton, hskinnemoen, nurhussein, linux-kernel,
randy.dunlap, arjan, mingo, a.p.zijlstra, kyle, schwidefsky
On Fri, May 16, 2008 at 02:21:27PM +0900, Paul Mundt wrote:
> Commit 95b570c9cef3b12356454c7112571b7e406b4b51 introduced a
> TAINT_WARN that was implemented for all architectures using the
> generic warn_on_slowpath(), which excluded any architecture that
> set HAVE_ARCH_WARN_ON.
>
> As all of the architectures that implement their own WARN_ON()
> all go through the report_bug() path (specifically handling
> BUG_TRAP_TYPE_WARN), taint the kernel there as well for consistency.
>
> Tested on avr32 and sh. Also relevant for s390, parisc, and powerpc.
>
> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
>
obviously fine by me.
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-16 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16 5:21 [PATCH] lib: Taint kernel in common report_bug() WARN path Paul Mundt
2008-05-16 14:57 ` Kyle McMartin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.