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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061230194607.GT912@telegraafnet.nl>
Date:	Sat, 30 Dec 2006 20:46:07 +0100
From:	Ard -kwaak- van Breemen <ard@...egraafnet.nl>
To:	Andrew Morton <akpm@...l.org>
Cc:	Greg KH <greg@...ah.com>, "Zhang, Yanmin" <yanmin.zhang@...el.com>,
	Chuck Ebbert <76306.1226@...puserve.com>,
	Yinghai Lu <yinghai.lu@....com>, take@...ero.it,
	agalanin@...a.ru, linux-kernel@...r.kernel.org,
	bugme-daemon@...zilla.kernel.org,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: [PATCH 2.6.20-rc2-git1] start_kernel: Test if irq's got enabled early, barf, and disable them again

The calls made by parse_parms to other initialization code might
enable interrupts again way too early.
Having interrupts on this early can make systems PANIC when they
initialize the IRQ controllers (which happens later in the code).
This patch detects that irq's are enabled again, barfs about it
and disables them again as a safety net.

Signed-off-by: Ard van Breemen <ard@...egraafnet.nl>

--- linux-2.6.20-rc2-git1/init/main.c.orig	2006-12-30 17:41:13.000000000 +0000
+++ linux-2.6.20-rc2-git1/init/main.c	2006-12-30 17:44:02.000000000 +0000
@@ -538,6 +538,10 @@ asmlinkage void __init start_kernel(void
 	parse_args("Booting kernel", command_line, __start___param,
 		   __stop___param - __start___param,
 		   &unknown_bootoption);
+	if (!irqs_disabled()) {
+		printk(KERN_WARNING "start_kernel(): bug: interrupts were enabled *very* early, fixing it\n");
+		local_irq_disable();
+	}
 	sort_main_extable();
 	trap_init();
 	rcu_init();
-
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