public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Neil Horman <nhorman@redhat.com>
Cc: Neil Horman <nhorman@tuxdriver.com>,
	akpm@linux-foundation.org, kexec@lists.infradead.org,
	linux-kernel@vger.kernel.org, ebiederm@xmission.com
Subject: Re: [PATCH] sysrq: Simplify sysrq-c handler
Date: Tue, 5 May 2009 10:53:44 -0400	[thread overview]
Message-ID: <20090505145344.GC9909@redhat.com> (raw)
In-Reply-To: <20090505144937.GD11817@hmsreliant.think-freely.org>

On Tue, May 05, 2009 at 10:49:37AM -0400, Neil Horman wrote:
> On Tue, May 05, 2009 at 10:23:59AM -0400, Vivek Goyal wrote:
> > On Tue, May 05, 2009 at 09:45:47AM -0400, Neil Horman wrote:
> > > Currently the sysrq-c handler is bit over-engineered.  Its behavior is dependent
> > > on a few compile time and run time factors that alter its behavior which is
> > > really unnecessecary.  If CONFIG_KEXEC is not configured, sysrq-c, crashes the
> > > system with a NULL pointer dereference.  If CONFIG_KEXEC is configured, it calls
> > > crash_kexec directly, which implies that the kexec kernel will either be booted
> > > (if its been previously loaded), or it will simply do nothing (the no kexec
> > > kernel has been loaded).  It would be much easier to just simplify the whole
> > > thing to dereference a NULL pointer all the time regardless of configuration.
> > > That way, it will always try to crash the system, and if a kexec kernel has been
> > > loaded into reserved space, it will still boot from the page fault trap handler
> > > (assuming panic_on_oops is set appropriately).
> > > 
> > 
> > Neil,
> > 
> > Would it make sense to call panic() directly so that we are not dependent
> > on panic_on_oops being set?
> > 
> > Thanks
> > Vivek
> > 
> I think a good argument could be made for doing that, but I kind of like
> traversing the entire page fault path, specifically to make sure that an oops
> works the way they expect it too.  If nothing else, going through the entire
> oops path like I do below will (hopefully) prevent people from complaining that
> sysrq-c works, but when their custom module gets an OOPS, then never get a
> vmcore :).

Ya, traversing an OOPs path makes sense because of complaint above you
pointed out.

> 
> I'll defer to an opposing consensus of course, but I think going through the
> entire oops path is a better solution.

I am fine with traversing OOps path.

Acked-by: Vivek Goyal <vgoyal@redhat.com>

Thanks
Vivek

      reply	other threads:[~2009-05-05 14:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-05 13:45 [PATCH] sysrq: Simplify sysrq-c handler Neil Horman
2009-05-05 14:23 ` Vivek Goyal
2009-05-05 14:49   ` Neil Horman
2009-05-05 14:53     ` Vivek Goyal [this message]

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=20090505145344.GC9909@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=nhorman@tuxdriver.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