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: <20100712174420.GC5687@lenovo>
Date:	Mon, 12 Jul 2010 21:44:20 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Pekka Enberg <penberg@...helsinki.fi>,
	Yinghai Lu <yinghai.lu@...cle.com>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: Setup early console as early as possible

On Mon, Jul 12, 2010 at 08:47:03AM -0700, H. Peter Anvin wrote:
> On 07/12/2010 01:58 AM, Pekka Enberg wrote:
> > Hi Yinghai,
> > 
> > Yinghai Lu wrote:
> >> Analyze "console=uart8250,io,0x3f8,115200n8" in
> >> i386_start_kernel/x86_64_start_kernel,
> >> and call setup_early_serial8250_console() to init early serial console.
> >>
> >> only can handle io port kind of 8250. because mmio need ioremap.
> >>
> >> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
> > 
> > What's the purpose of this patch? Does it make my early boot I/O patch
> > obsolete?
> > 
> >             Pekka
> 
> No, they're complementary.  Your patch serial-port enables the RM
> kernel, whereas Yinghai pushes the initialization earlier in the PM kernel.
> 
> Incidentally, Yinghai: it would be possible to push even an MMIO
> reference earlier by reserving a fixmap slot for the early console.  I'm
> not sure if it's worth it, though.
> 
> 	-hpa
>

Peter, while reviewing this patch I found another nit in
context of early_param usage, so the patch is below. It's
completely trivial. Actually I thought I've already fixed
all early_param cases long ago but this one somehow sneaked ;)

Anyway, Yinghai, Peter,

I'm not sure but can't we use some boot_param "pad" field for
"being copied" flag instead of new variable? There is a case
when boot_param is used as __initdata and I'm not sure we clear
this section explicitly.

	-- Cyrill
---
From: Cyrill Gorcunov <gorcunov@...nvz.org>
Subject: [PATCH] early console: Prevent early_param null dereference

In case if user passes "earlycon" without args there will
be null dereference.

Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
---
 drivers/serial/8250_early.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux-2.6.git/drivers/serial/8250_early.c
=====================================================================
--- linux-2.6.git.orig/drivers/serial/8250_early.c
+++ linux-2.6.git/drivers/serial/8250_early.c
@@ -217,6 +217,9 @@ int __init setup_early_serial8250_consol
 	char *options;
 	int err;
 
+	if (!cmdline)
+		return 0;
+
 	options = strstr(cmdline, "uart8250,");
 	if (!options) {
 		options = strstr(cmdline, "uart,");
--
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