public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	"Chen, Gong" <gong.chen@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Luck, Tony" <tony.luck@intel.com>,
	Matthew Garrett <mjg@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
	"len.brown@intel.com" <len.brown@intel.com>,
	"ying.huang@intel.com" <ying.huang@intel.com>,
	"ak@linux.intel.com" <ak@linux.intel.com>,
	"hughd@chromium.org" <hughd@chromium.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"jmorris@namei.org" <jmorris@namei.org>,
	"a.p.zijlstra@chello.nl" <a.p.zijlstra@chello.nl>,
	"namhyung@gmail.com" <namhyung@gmail.com>,
	"dle-develop@lists.sourceforge.net" 
	<dle-develop@lists.sourceforge.net>,
	Satoru Moriya <satoru.moriya@hds.com>
Subject: Re: [RFC][PATCH -next] make pstore/kmsg_dump run after stopping other cpus in panic path
Date: Tue, 18 Oct 2011 11:10:58 -0400	[thread overview]
Message-ID: <20111018151058.GE3452@redhat.com> (raw)
In-Reply-To: <5C4C569E8A4B9B42A84A977CF070A35B2C57565D3A@USINDEVS01.corp.hds.com>

On Tue, Oct 18, 2011 at 10:52:22AM -0400, Seiji Aguchi wrote:
> Hi,
> 
> >> afacit this assumes that (reason == KMSG_DUMP_PANIC) if in_nmi().  Is
> >> that always the case, and will it always be the case in the future?
> >
> 
> Currently, when kernel is in nmi context and kmsg_dump() are called, its reason is always "KMSG_DUMP_PANIC".
> 
> >
> >Perhaps a 'BUG_ON(in_nmi() && reason != KMSG_DUMP_PANIC)'?
> 
> I don't think BUG_ON() is needed.
> 
> If someone would like to log messages in the case of "in_nmi() && reason != KMSG_DUMP_PANIC",
> he/she will add a new trigger as follows.

The point I was trying to make with the BUG_ON is to catch future uses of
NMI and kmsg_dump that were implemented without understanding the
restriction we place (you have to be in a panic path for NMI to use
pstore/kmsg_dump).

That is part of the wider problem with kmsg_dump that Vivek talks about
with me, is that it is just a giant hook in the panic path with limited
auditing.  So we need to explicit set our expectations with BUG_ONs/WARNs
otherwise we might get bit later by them.

Cheers,
Don

  reply	other threads:[~2011-10-18 15:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-14 20:53 [RFC][PATCH -next] make pstore/kmsg_dump run after stopping other cpus in panic path Seiji Aguchi
2011-10-17  6:21 ` Chen Gong
2011-10-17 14:10   ` Seiji Aguchi
2011-10-18  7:28     ` Chen Gong
2011-10-17 16:09 ` Don Zickus
2011-10-17 16:56   ` Luck, Tony
2011-10-17 17:22     ` Don Zickus
2011-10-17 17:34       ` Seiji Aguchi
2011-10-17 23:47 ` Andrew Morton
2011-10-18 12:49   ` Don Zickus
2011-10-18 14:52     ` Seiji Aguchi
2011-10-18 15:10       ` Don Zickus [this message]
2011-10-20 15:13         ` Seiji Aguchi
2011-10-20 17:48           ` Don Zickus
2011-10-20 18:39             ` Seiji Aguchi

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=20111018151058.GE3452@redhat.com \
    --to=dzickus@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=gong.chen@intel.com \
    --cc=hughd@chromium.org \
    --cc=jmorris@namei.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mjg@redhat.com \
    --cc=namhyung@gmail.com \
    --cc=satoru.moriya@hds.com \
    --cc=seiji.aguchi@hds.com \
    --cc=tony.luck@intel.com \
    --cc=vgoyal@redhat.com \
    --cc=ying.huang@intel.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