public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Lord <kernel@teksavvy.com>
To: Mahmood Naderan <nt_mahmood@yahoo.com>
Cc: Jiri Kosina <jkosina@suse.cz>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Cong Wang <xiyou.wangcong@gmail.com>
Subject: Re: logging on kernel panic
Date: Wed, 13 Jun 2012 11:15:00 -0400	[thread overview]
Message-ID: <4FD8AE74.3080708@teksavvy.com> (raw)
In-Reply-To: <1339599156.30833.YahooMailNeo@web111716.mail.gq1.yahoo.com>

On 12-06-13 10:52 AM, Mahmood Naderan wrote:
>
>> The kernel log may not hit /var/log/syslog when kernel panics,
> Can I ask why. Just before a panic, kernel is still alive and can log. 
> Isn't that?

The kernel writes log messages to a circular in-RAM fifo (/proc/kmsg).
They then later get saved to a file such as /var/log/syslog by some
userspace task, eg. rsyslogd or syslogd.

At the point a Kernel Panic, the kernel is considered "dead",
or "non trustworthy" due to the error condition that triggered the panic.
Attempting to continue after the panic would be unwise,
with the possibilities including opening huge security holes/leaks
and/or corrupting user data.

So it is no longer alive, and will not be scheduling the userspace tasks
that might copy the log to a file for you.  Thus, nothing gets saved.




  reply	other threads:[~2012-06-13 15:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 12:18 logging on kernel panic Mahmood Naderan
2012-06-13 12:39 ` Alan Cox
2012-06-13 13:54   ` Jiri Kosina
2012-06-13 14:52     ` Mahmood Naderan
2012-06-13 15:15       ` Mark Lord [this message]
2012-06-14  8:02       ` Jiri Kosina
2012-06-13 13:38 ` Cong Wang

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=4FD8AE74.3080708@teksavvy.com \
    --to=kernel@teksavvy.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nt_mahmood@yahoo.com \
    --cc=xiyou.wangcong@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox