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: <20090701124414.fe188893.akpm@linux-foundation.org>
Date:	Wed, 1 Jul 2009 12:44:14 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Robin Getz <rgetz@...ckfin.uclinux.org>
Cc:	mingo@...e.hu, linux-kernel@...r.kernel.org,
	torvalds@...ux-foundation.org, vapier.adi@...il.com,
	lethal@...ux-sh.org
Subject: Re: [RFC v2] kernel/printk.c - handling more than one CON_BOOT

On Tue, 30 Jun 2009 22:51:52 -0400
Robin Getz <rgetz@...ckfin.uclinux.org> wrote:

> From: Robin Getz <rgetz@...ckfin.uclinux.org>
> 
> Today, register_console() assumes the following usage:
>   - The first console to register with a flag set to CON_BOOT is the
>     one and only bootconsole.
>   - If another register_console() is called with an additional CON_BOOT,
>     it is silently rejected.
>   - As soon as a console without the CON_BOOT set calls registers
>     the bootconsole is automatically unregistered.
>   - Once there is a "real" console - register_console() will silently
>     reject any consoles with it's CON_BOOT flag set.

hm.  I never knew all that.  Thanks for taking the time to explain all
this - it helps.

I think it would be useful if we had a description of the new design,
similar to your description of the "Today" behaviour above.  Perhaps
as a comment over register_console()?

> In many systems (alpha, blackfin, microblaze, mips, powerpc, sh, & x86), there 
> are early_printk implementations, which use the CON_BOOT which come out 
> serial ports, vga, usb, & memory buffers. In many embedded systems, it would 
> be nice to have two - in case the primary fails, you always have access to a
> backup memory buffer - but this requires at least two CON_BOOT consoles.
> 
> This changeset allows multiple boot consoles, and changes the functionality
> to, be mostly the same as the above.
>  - Any number CON_BOOT consoles of can be registered
>  - A "real" console will unregister all the CON_BOOT consoles
>  - Once a "real" console is registered, no more CON_BOOT consoles 
>    can be added (still silently rejected)

Is the "silent" rejection desirable?  Perhaps that's a
programming/configuration error which the developer should be informed
of?


> diff -puN kernel/printk.c~kernel-printkc-handling-more-than-one-con_boot kernel/printk.c
> --- a/kernel/printk.c~kernel-printkc-handling-more-than-one-con_boot
> +++ a/kernel/printk.c
> @@ -37,6 +37,12 @@
>  #include <asm/uaccess.h>
>  
>  /*
> + * for_each_console() allows you to iterate on each console
> + */
> +#define for_each_console(con) \
> +	for (con = console_drivers; con != NULL; con = con->next)

hum.  Fair enough.


The patch looks good to me.
--
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