All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ahmed S. Darwish" <darwish.07-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: "Willy Tarreau"
	<wtarreau-Dj75qbTlC0E76Z2rM5mHXA@public.gmane.org>,
	"Dirk Hohndel" <hohndel-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	"Frédéric Weisbecker"
	<fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	FBDEV-ML <linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	IDE-ML <linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Randy Dunlap" <rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org>,
	"James Bottomley" <James.Bottomley-l3A5Bk7waGM@public.gmane.org>,
	"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
	X86-ML <x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Ingo Molnar" <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Ingo Molnar" <mingo-X9Un+BFzKDI@public.gmane.org>,
	"Jeff Garzik" <jgarzik-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>,
	"Vivek Goyal" <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Peter Zijlstra"
	<a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org>,
	Dirk.Hohndel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	"Borislav Petkov" <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>,
	"Dave Jones" <davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Thomas Gleixner" <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	"Mark Lord" <kernel-R6A+fiHC8nRWk0Htik3J/w@public.gmane.org>,
	"Arjan van de Ven"
	<arjan-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	"Tony Luck" <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	KEXEC-ML
	<kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Haren Myneni" <hbabu-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic
Date: Wed, 26 Jan 2011 14:49:54 +0200	[thread overview]
Message-ID: <20110126124954.GC24527@laptop> (raw)
In-Reply-To: <AANLkTinU0KYiCd4p=z+=ojbkeEoT2G+CAYvdRU02KJEn-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi,

On Wed, Jan 26, 2011 at 06:25:19AM +1000, Linus Torvalds wrote:
> On Tue, Jan 25, 2011 at 11:47 PM, Ahmed S. Darwish <darwish.07-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > As a possible solution, below patches prototypes the idea of persistently
> > storing the kernel log ring to a hard disk partition using the enhanced BIOS
> > 0x13 services.
> >
>
> Quite frankly, I'm not likely to _ever_ merge anything like this.
> 
> Over the years, many people have tried to write things to disk on
> oops. I refuse to take it. No way in hell do I want the situation of
> "the system is screwed, so let's overwrite the disk" to be something
> the kernel I release might do. It's crazy. That disk is a lot more
> important than the kernel, and overwriting it when we might have
> serious memory corruption issues or something is not a thing I feel is
> appropriate.
> 

OK, I've carefully read all the criticism posted here and in the other
replies. A short summary:

- It will be _too_ much to restore the PIC, IO-APIC, PCI configuration,
  and disk controllers to the BIOS Power-on self-test (POST) state. The
  solution will not be guaranteed to work on all machines.

- The write path of the BIOS INT 0x13 services is not tested enough by
  contemporary x86 kernels (Windows and Linux). Thus, that part of the
  BIOS is probably not as stable as I originally claimed.

Possible solutions:

- Having a minimal "fail-safe" disk controller driver to access the
  disk. This can't be made "perfect" enough to work on all combinations
  of machines (Though it can work on a small subset, e.g. the usual lot
  of x86 laptops with Intel chipsets). Linus is not OK with the _whole_
  idea of doing _any_ disk write on panic.

- Use kexec/kdump. I wonder though, can kexec work on early panics? The
  kind where the disk itself might not yet be initialized?

  If not, can kexec be modified to do so? That possibly needs the help
  of a a bootloader extension.

- The latest approach (proposed by Linus) is to forget the disk: jump to
  real-mode, but display the kernel log in a fancy format (with scroll
  ups and downs) instead.

  Will re-initializing the VGA registers to their POST state be possible?
  If not, what about a "fail-safe" VGA driver?

I'm most likely going to implement either the second or the third point,
so I'd really appreciate some input.

thanks,

> 
> If you want to do the BIOS services thing, do it for video: copy the
> oops to low RAM, return to real mode, re-run the graphics card POST
> routines to initialize text-mode, and use the BIOS to print out the
> oops.  That is WAY less scary than writing to disk.
> 
>                               Linus

-- 
Darwish
http://darwish.07.googlepages.com

WARNING: multiple messages have this Message-ID (diff)
From: "Ahmed S. Darwish" <darwish.07@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Willy Tarreau" <wtarreau@hera.kernel.org>,
	"Dirk Hohndel" <hohndel@infradead.org>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	FBDEV-ML <linux-fbdev@vger.kernel.org>,
	IDE-ML <linux-ide@vger.kernel.org>,
	"Randy Dunlap" <rdunlap@xenotime.net>,
	"James Bottomley" <James.Bottomley@suse.de>,
	"H. Peter Anvin" <hpa@zytor.com>, X86-ML <x86@kernel.org>,
	"Ingo Molnar" <mingo@redhat.com>, "Ingo Molnar" <mingo@elte.hu>,
	"Jeff Garzik" <jgarzik@pobox.com>,
	"Vivek Goyal" <vgoyal@redhat.com>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	Dirk.Hohndel@intel.com, "Borislav Petkov" <bp@alien8.de>,
	"Dave Jones" <davej@redhat.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Mark Lord" <kernel@teksavvy.com>,
	"Arjan van de Ven" <arjan@infradead.org>,
	"Tony Luck" <tony.luck@intel.com>,
	KEXEC-ML <kexec@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Haren Myneni" <hbabu@us.ibm.com>,
	"Eric Biederman" <ebiederm@xmission.com>,
	"Tejun Heo" <tj@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Willy Tarreau" <w@1wt.eu>
Subject: Re: [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic
Date: Wed, 26 Jan 2011 14:49:54 +0200	[thread overview]
Message-ID: <20110126124954.GC24527@laptop> (raw)
In-Reply-To: <AANLkTinU0KYiCd4p=z+=ojbkeEoT2G+CAYvdRU02KJEn@mail.gmail.com>

Hi,

On Wed, Jan 26, 2011 at 06:25:19AM +1000, Linus Torvalds wrote:
> On Tue, Jan 25, 2011 at 11:47 PM, Ahmed S. Darwish <darwish.07@gmail.com> wrote:
> >
> > As a possible solution, below patches prototypes the idea of persistently
> > storing the kernel log ring to a hard disk partition using the enhanced BIOS
> > 0x13 services.
> >
>
> Quite frankly, I'm not likely to _ever_ merge anything like this.
> 
> Over the years, many people have tried to write things to disk on
> oops. I refuse to take it. No way in hell do I want the situation of
> "the system is screwed, so let's overwrite the disk" to be something
> the kernel I release might do. It's crazy. That disk is a lot more
> important than the kernel, and overwriting it when we might have
> serious memory corruption issues or something is not a thing I feel is
> appropriate.
> 

OK, I've carefully read all the criticism posted here and in the other
replies. A short summary:

- It will be _too_ much to restore the PIC, IO-APIC, PCI configuration,
  and disk controllers to the BIOS Power-on self-test (POST) state. The
  solution will not be guaranteed to work on all machines.

- The write path of the BIOS INT 0x13 services is not tested enough by
  contemporary x86 kernels (Windows and Linux). Thus, that part of the
  BIOS is probably not as stable as I originally claimed.

Possible solutions:

- Having a minimal "fail-safe" disk controller driver to access the
  disk. This can't be made "perfect" enough to work on all combinations
  of machines (Though it can work on a small subset, e.g. the usual lot
  of x86 laptops with Intel chipsets). Linus is not OK with the _whole_
  idea of doing _any_ disk write on panic.

- Use kexec/kdump. I wonder though, can kexec work on early panics? The
  kind where the disk itself might not yet be initialized?

  If not, can kexec be modified to do so? That possibly needs the help
  of a a bootloader extension.

- The latest approach (proposed by Linus) is to forget the disk: jump to
  real-mode, but display the kernel log in a fancy format (with scroll
  ups and downs) instead.

  Will re-initializing the VGA registers to their POST state be possible?
  If not, what about a "fail-safe" VGA driver?

I'm most likely going to implement either the second or the third point,
so I'd really appreciate some input.

thanks,

> 
> If you want to do the BIOS services thing, do it for video: copy the
> oops to low RAM, return to real mode, re-run the graphics card POST
> routines to initialize text-mode, and use the BIOS to print out the
> oops.  That is WAY less scary than writing to disk.
> 
>                               Linus

-- 
Darwish
http://darwish.07.googlepages.com

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2011-01-26 12:49 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 13:47 [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Ahmed S. Darwish
2011-01-25 13:51 ` [PATCH -next 1/2][RFC] x86: Saveoops: Switch to real-mode and call BIOS Ahmed S. Darwish
2011-01-25 17:26   ` H. Peter Anvin
2011-01-25 13:53 ` [PATCH -next 2/2][RFC] x86: Saveoops: Reserve low memory and register code Ahmed S. Darwish
2011-01-25 17:29   ` H. Peter Anvin
2011-01-26  9:04     ` Ahmed S. Darwish
2011-01-25 14:09 ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Ingo Molnar
2011-01-25 15:08   ` Tejun Heo
2011-01-25 17:33     ` H. Peter Anvin
2011-01-26 11:44       ` Ahmed S. Darwish
2011-02-03 14:36     ` Pavel Machek
2011-02-03 15:28       ` H. Peter Anvin
2011-02-03 17:57         ` Ingo Molnar
2011-02-03 21:07           ` H. Peter Anvin
2011-01-25 15:36   ` Ahmed S. Darwish
2011-01-25 16:02     ` James Bottomley
2011-01-25 17:05       ` Ahmed S. Darwish
2011-01-25 17:20         ` James Bottomley
2011-01-25 22:10         ` Mark Lord
2011-01-25 22:16           ` Randy Dunlap
2011-01-25 22:45             ` Jeff Garzik
2011-01-25 22:58               ` H. Peter Anvin
2011-01-26  0:26                 ` Jeff Garzik
2011-01-31  2:59                 ` Rusty Russell
2011-01-31 10:45                   ` Ingo Molnar
2011-01-25 17:32     ` Tony Luck
2011-01-25 17:36       ` H. Peter Anvin
2011-01-25 19:04       ` Jeff Garzik
2011-01-25 14:49 ` Tejun Heo
2011-01-28  7:59   ` Jan Ceuleers
2011-01-25 20:25 ` Linus Torvalds
     [not found]   ` <AANLkTinU0KYiCd4p=z+=ojbkeEoT2G+CAYvdRU02KJEn-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-26 12:49     ` Ahmed S. Darwish [this message]
2011-01-26 12:49       ` Ahmed S. Darwish
2011-01-26 12:58       ` Ingo Molnar
2011-01-26 12:58         ` Ingo Molnar
     [not found]         ` <20110126125813.GA26952-X9Un+BFzKDI@public.gmane.org>
2011-01-26 13:34           ` Ahmed S. Darwish
2011-01-26 13:34             ` Ahmed S. Darwish
2011-01-26 14:00             ` Ingo Molnar
2011-01-26 14:00               ` Ingo Molnar
     [not found]               ` <20110126140030.GB30064-X9Un+BFzKDI@public.gmane.org>
2011-01-27  4:35                 ` H. Peter Anvin
2011-01-27  4:35                   ` H. Peter Anvin
     [not found]                   ` <4D40F5FD.6090507-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2011-01-27 11:41                     ` Ingo Molnar
2011-01-27 11:41                       ` Ingo Molnar
     [not found]                       ` <20110127114113.GB20279-X9Un+BFzKDI@public.gmane.org>
2011-01-27 15:47                         ` Eric W. Biederman
2011-01-27 15:47                           ` Eric W. Biederman
     [not found]                           ` <m1aaimxs9h.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-01-27 16:12                             ` H. Peter Anvin
2011-01-27 16:12                               ` H. Peter Anvin
2011-01-26 23:07       ` Luck, Tony
2011-01-26 23:07         ` Luck, Tony
2011-01-26 23:07         ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon Luck, Tony
2011-01-26 23:07         ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Luck, Tony
     [not found]         ` <987664A83D2D224EAE907B061CE93D53019438EABF-osO9UTpF0URqS6EAlXoojrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-01-26 23:16           ` Dave Jones
2011-01-26 23:16             ` Dave Jones
     [not found]             ` <20110126231620.GA14807-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-01-26 23:21               ` Luck, Tony
2011-01-26 23:21                 ` Luck, Tony
     [not found]                 ` <20110126233033.GB14807@redhat.com>
     [not found]                   ` <987664A83D2D224EAE907B061CE93D53019438EBB6@orsmsx505.amr.corp.intel.com>
     [not found]                     ` <4D40F7F1.3020509@zytor.com>
     [not found]                       ` <20110127120039.GD20279@elte.hu>
2011-01-27 18:35                         ` Luck, Tony
2011-01-27 18:35                           ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon Luck, Tony
2011-01-27 18:35                           ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Luck, Tony
     [not found]                         ` <4D4197CB.9070201@zytor.com>
     [not found]                           ` <20110127162429.GB26437@elte.hu>
2011-01-27 18:56                             ` Luck, Tony
2011-01-27 18:56                               ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon Luck, Tony
2011-01-27 18:56                               ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Luck, Tony
2011-01-27  1:09           ` Ahmed S. Darwish
2011-01-27  1:09             ` Ahmed S. Darwish
     [not found]       ` <20110127021338.GA20334@redhat.com>
     [not found]         ` <20110127021338.GA20334-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-01-27  3:33           ` Ahmed S. Darwish
2011-01-27  3:33             ` Ahmed S. Darwish
2011-01-27  4:44           ` H. Peter Anvin
2011-01-27  4:44             ` H. Peter Anvin
     [not found]             ` <4D40F81E.1030009-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2011-01-27  5:26               ` Ahmed S. Darwish
2011-01-27  5:26                 ` Ahmed S. Darwish
2011-01-27  7:51                 ` Eric W. Biederman
2011-01-27  7:51                   ` Eric W. Biederman
2011-02-02 11:13                   ` Ahmed S. Darwish
2011-02-02 11:13                     ` Ahmed S. Darwish
2011-02-02 11:13                     ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk Ahmed S. Darwish
2011-02-02 11:13                     ` [PATCH 0/2][concept RFC] x86: BIOS-save kernel log to disk upon panic Ahmed S. Darwish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110126124954.GC24527@laptop \
    --to=darwish.07-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Dirk.Hohndel-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=James.Bottomley-l3A5Bk7waGM@public.gmane.org \
    --cc=a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org \
    --cc=arjan-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
    --cc=davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=hbabu-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=hohndel-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=jgarzik-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org \
    --cc=kernel-R6A+fiHC8nRWk0Htik3J/w@public.gmane.org \
    --cc=kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=mingo-X9Un+BFzKDI@public.gmane.org \
    --cc=rdunlap-/UHa2rfvQTnk1uMJSBkQmQ@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=wtarreau-Dj75qbTlC0E76Z2rM5mHXA@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.