All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [uml-devel] [patch 094/241] uml: fix error output during early boot
       [not found] <200702100944.l1A9iSEp008813@shell0.pdx.osdl.net>
@ 2007-02-10 12:31 ` Blaisorblade
  2007-02-10 22:21   ` Jeff Dike
  0 siblings, 1 reply; 3+ messages in thread
From: Blaisorblade @ 2007-02-10 12:31 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Jeff Dike

On Saturday 10 February 2007 10:44, akpm@linux-foundation.org wrote:
> From: Jeff Dike <jdike@addtoit.com>
>
> The startup code panics a lot if anything goes wrong early on.  This is
> wrong for several reasons, like the kernel isn't running, so you can't
> really be calling into it yet, but the harm comes from useful error
> messages being trapped in the printk ring where no one will ever see them.
>
> This patch changes these panics to perror and printf in wrappers which also
> exit.  Normal, informational, prints are also wrapped so that
> fflush(stdout) is called after each one.  This is so the output appears in
> the correct sequence in the event of an error.

libc's printf has an enormous stack usage, so that my_printf is used for 
direct output instead of printf; if this is ok because it's bootup code, then 
*fatal* should be marked as "bootup code only"; otherwise we may reuse 
vsprintf() and write() or fputs(); this should match what happens in 
my_printf, to avoid any unlikely problem with libc's buffering.
-- 
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [uml-devel] [patch 094/241] uml: fix error output during early boot
  2007-02-10 12:31 ` [uml-devel] [patch 094/241] uml: fix error output during early boot Blaisorblade
@ 2007-02-10 22:21   ` Jeff Dike
  2007-02-12 18:59     ` Blaisorblade
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Dike @ 2007-02-10 22:21 UTC (permalink / raw)
  To: Blaisorblade; +Cc: user-mode-linux-devel

On Sat, Feb 10, 2007 at 01:31:20PM +0100, Blaisorblade wrote:
> libc's printf has an enormous stack usage, so that my_printf is used for 
> direct output instead of printf; if this is ok because it's bootup
> code, 

It is bootup code only.

> then *fatal* should be marked as "bootup code only"; 

OK.

> otherwise
> we may reuse vsprintf() and write() or fputs(); this should match
> what happens in my_printf, to avoid any unlikely problem with libc's
> buffering. 

Offhand, I would say that if we are on a kernel stack, printk is safe
to use, and should be used, so there's no need for things like
my_printf.  Maybe there are some exceptions in early boot when the
kernel is running, but before the console is working, but I can't
think of any problems we've had like that.

				Jeff

-- 
Work email - jdike at linux dot intel dot com

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [uml-devel] [patch 094/241] uml: fix error output during early boot
  2007-02-10 22:21   ` Jeff Dike
@ 2007-02-12 18:59     ` Blaisorblade
  0 siblings, 0 replies; 3+ messages in thread
From: Blaisorblade @ 2007-02-12 18:59 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-devel

On Saturday 10 February 2007 23:21, Jeff Dike wrote:
> On Sat, Feb 10, 2007 at 01:31:20PM +0100, Blaisorblade wrote:
> > libc's printf has an enormous stack usage, so that my_printf is used for
> > direct output instead of printf; if this is ok because it's bootup
> > code,
>
> It is bootup code only.
>
> > then *fatal* should be marked as "bootup code only";
>
> OK.
>
> > otherwise
> > we may reuse vsprintf() and write() or fputs(); this should match
> > what happens in my_printf, to avoid any unlikely problem with libc's
> > buffering.
>
> Offhand, I would say that if we are on a kernel stack, printk is safe
> to use, and should be used, so there's no need for things like
> my_printf.  Maybe there are some exceptions in early boot when the
> kernel is running, but before the console is working, but I can't
> think of any problems we've had like that.

It's for no_config_chan (don't recall the right name), i.e. for when the 
console will never work because of a misconfiguration. Indeed it's static 
(and otherwise it ought to have a better name!).

-- 
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-12 18:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200702100944.l1A9iSEp008813@shell0.pdx.osdl.net>
2007-02-10 12:31 ` [uml-devel] [patch 094/241] uml: fix error output during early boot Blaisorblade
2007-02-10 22:21   ` Jeff Dike
2007-02-12 18:59     ` Blaisorblade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.