All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Michal Marek <mmarek@suse.cz>,
	Peter Zijlstra <peterz@infradead.org>,
	x86@kernel.org, live-patching@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/2] Compile-time stack frame pointer validation
Date: Wed, 25 Mar 2015 18:34:55 -0500	[thread overview]
Message-ID: <20150325233455.GA15796@treble.redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1503260020210.6781@pobox.suse.cz>

On Thu, Mar 26, 2015 at 12:24:45AM +0100, Jiri Kosina wrote:
> On Wed, 25 Mar 2015, Josh Poimboeuf wrote:
> 
> > In discussions around my live kernel patching consistency model RFC [1], 
> > Peter and Ingo correctly pointed out that stack traces aren't reliable.  
> > And as Ingo said, there's no "strong force" which ensures we can rely on 
> > them.
> > 
> > So I've been thinking about how to fix that.  My goal is to eventually 
> > make stack traces reliable.  Or at the very least, to be able to detect 
> > at runtime when a given stack trace *might* be unreliable.  But improved 
> > stack traces would broadly benefit the entire kernel, regardless of the 
> > outcome of the live kernel patching consistency model discussions.
> [ ... snip ... ]
> 
> I haven't really gone through your patchset thoroughly yet, but I just 
> wanted to make sure that you are aware of existing DWARF-based stack 
> unwinder which exists for the kernel.
> 
> It's not merged in mainline (one of the reasons being disagreements about 
> bugfixes between Jan and Linus), but we've been carrying it in SUSE 
> kernels as an out-of-tree patch for quite some time, and it really makes 
> stack dumps much more reliable and understandable.
> 
> You can see it for example here:
> 
> 	http://kernel.suse.com/cgit/kernel-source/tree/patches.suse/stack-unwind
> 
> (and some merge attempt failures due to disagreements between Jan and 
> Linus, not really completely related to the actual code itself, in LKML 
> archives).

Thanks, that could be helpful.  I also found a nice (currently only
32-bit) DWARF unwinder in arch/sh/kernel/dwarf.c.

The DWARF metadata has a reputation for being unreliable, but I have
some ideas on how to improve it for future patch sets, with both
compile-time and runtime validations.

-- 
Josh

  reply	other threads:[~2015-03-25 23:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 22:50 [RFC PATCH 0/2] Compile-time stack frame pointer validation Josh Poimboeuf
2015-03-25 22:50 ` [RFC PATCH 1/2] x86, stackvalidate: " Josh Poimboeuf
2015-03-25 22:50 ` [RFC PATCH 2/2] x86: Add asm frame pointer setup macros Josh Poimboeuf
2015-03-25 23:24 ` [RFC PATCH 0/2] Compile-time stack frame pointer validation Jiri Kosina
2015-03-25 23:34   ` Josh Poimboeuf [this message]
2015-03-26  9:23   ` Ingo Molnar

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=20150325233455.GA15796@treble.redhat.com \
    --to=jpoimboe@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmarek@suse.cz \
    --cc=peterz@infradead.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 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.