public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <rric@kernel.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Zhang, Jun" <jun.zhang@intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"x86@kernel.org" <x86@kernel.org>,
	"oprofile-list@lists.sf.net" <oprofile-list@lists.sf.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] Sometimes, there is OOPS happened when we use oprofile.
Date: Wed, 31 Oct 2012 23:45:23 +0100	[thread overview]
Message-ID: <20121031224523.GF4386@ivy.homofaber> (raw)
In-Reply-To: <5091991D.4020202@zytor.com>

On 31.10.12 14:33:17, H. Peter Anvin wrote:
> I'm vaguely concerned about the following:
> 
> + * To always return a non-null
> + * stack pointer we fall back to regs as stack if no previous stack
> + * exists.
> 
> The logic being that if there is no stack pointer and the stack is
> too empty, to simply assume regs point to the top of the stack?  Is
> this possible to ever be actually seen?

I discussed this with Steven too (https://lkml.org/lkml/2012/9/6/322)
and we both had a bad feeling with returning a null pointer by
kernel_stack_pointer() (implemented in version 1 of this patch). It
could be null if tinfo->previous_esp is null (last stack). Not sure
when this may happen.

So using regs as fallback seemed to be ok as this was in for years:

 7b6c6c7 x86, 32-bit: fix kernel_trap_sp()

-Robert

      reply	other threads:[~2012-10-31 22:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29  2:33 [PATCH] Sometimes, there is OOPS happened when we use oprofile Zhang, Jun
2012-10-31 21:05 ` Robert Richter
2012-10-31 21:27   ` H. Peter Anvin
2012-10-31 21:33   ` H. Peter Anvin
2012-10-31 22:45     ` Robert Richter [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=20121031224523.GF4386@ivy.homofaber \
    --to=rric@kernel.org \
    --cc=hpa@zytor.com \
    --cc=jun.zhang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oprofile-list@lists.sf.net \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox