mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Michal Marek <mmarek@suse.cz>,
	x86@kernel.org, live-patching@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] x86, stackvalidate: Compile-time stack frame pointer validation
Date: Tue, 28 Apr 2015 16:26:55 +0200	[thread overview]
Message-ID: <20150428142655.GG5029@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20150428142105.GB17315@treble.redhat.com>

On Tue, Apr 28, 2015 at 09:21:05AM -0500, Josh Poimboeuf wrote:

> > > I tried that, but I discovered that gcc's usage of frame pointers would
> > > be a lot harder to validate.  It only sets up the frame pointer in code
> > > paths which have call instructions.  There are a lot of functions which
> > > have conditional jumps at the beginning which can jump straight to a
> > > return instruction without first doing the frame pointer setup.
> > 
> > Hmm, would not such code break your patching?
> 
> No, because we'll also do some runtime stack validation (which will be a
> future patch set).  If we detect preemption or an irq frame on the
> stack, we'll assume the stack is unreliable and delay the patching of
> the task (*).

Ah, which fixes your second issue too (the interrupt before frame
setup). OK.


  reply	other threads:[~2015-04-28 14:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 13:56 [PATCH 0/2] " Josh Poimboeuf
2015-04-27 13:56 ` [PATCH 1/2] x86, stackvalidate: " Josh Poimboeuf
2015-04-28 12:16   ` Peter Zijlstra
2015-04-28 14:04     ` Josh Poimboeuf
2015-04-28 14:08       ` Peter Zijlstra
2015-04-28 14:21         ` Josh Poimboeuf
2015-04-28 14:26           ` Peter Zijlstra [this message]
2015-04-28 16:44   ` Petr Mladek
2015-04-28 17:54     ` Josh Poimboeuf
2015-04-27 13:56 ` [PATCH 2/2] x86, stackvalidate: Add asm frame pointer setup macros Josh Poimboeuf

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=20150428142655.GG5029@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmarek@suse.cz \
    --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

Powered by JetHome