public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Chuck Ebbert <cebbert@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andi Kleen <andi@firstfloor.org>,
	Andreas Krebbel <krebbel1@de.ibm.com>
Subject: Re: Wanted: simple, safe x86 stack overflow detection
Date: Mon, 5 Mar 2007 13:39:40 +0100	[thread overview]
Message-ID: <20070305123940.GA13850@one.firstfloor.org> (raw)
In-Reply-To: <200703050218.25028.arnd@arndb.de>

On Mon, Mar 05, 2007 at 02:18:24AM +0100, Arnd Bergmann wrote:
> On Wednesday 28 February 2007, Chuck Ebbert wrote:
> > Can we just put a canary in the threadinfo and check it on every
> > task switch? What are the drawbacks?
> 
> It's not completely reliable, in case of functions that allocate
> far too much stack space. You might want to take a look at the
> gcc support that Andreas Krebbel implemented for s390 to check
> for stack overflows:

I hacked this up for x86-64 too at some point (using 
the gprof support). However it's quite slow.

Here's the old 2.4 patch:

ftp://ftp.x86-64.org/pub/linux/debug/stackcheck-1

-Andi

      reply	other threads:[~2007-03-05 12:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28 14:27 Wanted: simple, safe x86 stack overflow detection Chuck Ebbert
2007-02-28 16:31 ` Thiago Galesi
2007-02-28 20:41 ` Andi Kleen
2007-02-28 23:20   ` Bill Irwin
2007-02-28 23:36     ` Jan Engelhardt
2007-02-28 23:45       ` Bill Irwin
2007-03-04  1:50   ` Bill Irwin
2007-03-06 18:59     ` Chuck Ebbert
2007-03-06 19:43       ` Hugh Dickins
2007-03-06 20:34         ` Bill Irwin
2007-03-07  4:28           ` Arjan van de Ven
2007-03-07  6:44             ` Bill Irwin
2007-03-07 12:34               ` Arjan van de Ven
2007-03-07 14:48                 ` Bill Irwin
2007-03-07 15:04                   ` Arjan van de Ven
2007-03-08  7:43                   ` Avi Kivity
2007-03-19 20:53                     ` Eric W. Biederman
2007-03-06 20:06       ` Bill Irwin
2007-03-05  1:18 ` Arnd Bergmann
2007-03-05 12:39   ` Andi Kleen [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=20070305123940.GA13850@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=arnd@arndb.de \
    --cc=cebbert@redhat.com \
    --cc=krebbel1@de.ibm.com \
    --cc=linux-kernel@vger.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