lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 May 2008 14:21:27 +0900
From:	Paul Mundt <lethal@...ux-sh.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	hskinnemoen@...el.com, nurhussein@...il.com,
	linux-kernel@...r.kernel.org, randy.dunlap@...cle.com,
	arjan@...radead.org, mingo@...e.hu, a.p.zijlstra@...llo.nl,
	kyle@...isc-linux.org, schwidefsky@...ibm.com
Subject: [PATCH] lib: Taint kernel in common report_bug() WARN path.

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@...el.com>
Signed-off-by: Paul Mundt <lethal@...ux-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;
 	}
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ