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]
Date:	Wed, 3 Dec 2008 10:37:25 -0800
From:	"Luck, Tony" <tony.luck@...el.com>
To:	Rusty Russell <rusty@...tcorp.com.au>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:	Richard Henderson <rth@...ddle.net>,
	Russell King <rmk@....linux.org.uk>,
	Haavard Skinnemoen <hskinnemoen@...el.com>,
	Bryan Wu <cooloney@...nel.org>,
	Mikael Starvik <starvik@...s.com>,
	David Howells <dhowells@...hat.com>,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	Hirokazu Takata <takata@...ux-m32r.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Greg Ungerer <gerg@...inux.org>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Grant Grundler <grundler@...isc-linux.org>,
	Paul Mackerras <paulus@...ba.org>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Paul Mundt <lethal@...ux-sh.org>,
	"David S. Miller" <davem@...emloft.net>,
	Jeff Dike <jdike@...toit.com>, Ingo Molnar <mingo@...hat.com>,
	Chris Zankel <chris@...kel.net>
Subject: RE: [RFC 5/8] param: arch_get_boot_command_line() (take II)

> I pulled your git tree.  All my test configs build cleanly
> for ia64 ... but sadly the first kernel I tested (generic_defconfig)
> doesn't boot (no console output at all).
> 
> I'll see if I can figure out what is going on.

Aha.  You are now calling machvec_init_from_cmdline() too early (before
efi_init() and io_port_init()) ... so we croak accessing things
that have not been set up.  Naive fix is to just move them from
setup_arch() to arch_get_boot_command_line().  I can't see how to
handle this more cleanly given that you do the rest of the
command line parsing before calling setup_arch().

With the addition of this patch ia64 bits are

Acked-by: Tony Luck <tony.luck@...el.com>

diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 12ee0a1..0951971 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -534,6 +534,9 @@ void __init arch_get_boot_command_line(void)
 	strlcpy(boot_command_line, __va(ia64_boot_param->command_line),
 		COMMAND_LINE_SIZE);
 
+	efi_init();
+	io_port_init();
+
 #ifdef CONFIG_IA64_GENERIC
 	/* machvec needs to be parsed from the command line
 	 * before parse_early_param() is called to ensure
@@ -552,9 +555,6 @@ void __init setup_arch(void)
 
 	ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);
 
-	efi_init();
-	io_port_init();
-
 	if (early_console_setup(boot_command_line) == 0)
 		mark_bsp_online();
 
This exacerbates a long standing `problem' that linux_banner
isn't the first thing printed ... with the above patch it
gets moved down even further to the sixth line:

$ dmesg
EFI v1.10 by INTEL: SALsystab=0x7fe0cce0 ACPI=0x7ff0d000 ACPI 2.0=0x7ff0c000 MPS=0x7ff0b000 SMBIOS=0xf0000
booting generic kernel on platform dig
Early serial console at I/O port 0x2f8 (options '115200')
console [uart0] enabled
Initializing cgroup subsys cpuset
Linux version 2.6.28-rc7-generic-smp (aegl@...ux-hwb01.sc.intel.com) (gcc version 4.3.1 (GCC) ) #2 SMP Wed Dec 3 11:27:26 PST 2008
 ...

Perhaps we also need to consider this patch to move it back
to a place of prominence?

diff --git a/init/main.c b/init/main.c
index 92ad2fe..38fcd41 100644
--- a/init/main.c
+++ b/init/main.c
@@ -538,6 +538,8 @@ asmlinkage void __init start_kernel(void)
 {
 	char *static_command_line;
 
+	printk(KERN_NOTICE);
+	printk(linux_banner);
 	arch_get_boot_command_line();
 	parse_args("Core params", boot_command_line, __start___core_param,
 		   __stop___core_param - __start___core_param,
@@ -569,8 +571,6 @@ asmlinkage void __init start_kernel(void)
 	tick_init();
 	boot_cpu_init();
 	page_address_init();
-	printk(KERN_NOTICE);
-	printk(linux_banner);
 	setup_arch();
 	mm_init_owner(&init_mm, &init_task);
 
--
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