mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Albert Cahalan <acahalan@gmail.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org, 76306.1226@compuserve.com,
	ak@muc.de, akpm@osdl.org
Subject: Re: i386 ABI and the stack
Date: Sat, 24 Jun 2006 13:03:18 +0200	[thread overview]
Message-ID: <1151146998.3181.26.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <787b0d920606231943x7aad43bwb108b6a88b678b1a@mail.gmail.com>

On Fri, 2006-06-23 at 22:43 -0400, Albert Cahalan wrote:
> On 6/23/06, Linus Torvalds <torvalds@osdl.org> wrote:
> > On Fri, 23 Jun 2006, H. Peter Anvin wrote:
> > > >
> > > > The x86-64 ABI has a 128-byte(*) zone that is safe from signals etc, so you
> > > > can use a small amount of stack below the stackpointer safely. Not so on
> > > > x86.
> > >
> > > Adding a small redzone like this to i386 would be easy, though -- just drop
> > > the stack pointer by that much when creating a signal frame.  128 bytes isn't
> > > enough to interfere with libraries.
> >
> > However, any binaries created with that in mind would be
> > buggy-by-definition on older kernels, so I don't think it's worth it.
> 
> Since gcc-2.96 would access 256 bytes below the stack pointer
> (according to the valgrind man page), the kernel needs to allow
> for this in signal handlers anyway.

only a handful buggy editions of that compiler did in a few corner
cases. And they were really buggy, and they were corner cases. Nobody
should be using a compiler like that; and nobody is expected to compile
software with a broken version of that compiler (iirc the window in
which it was broken was really small). There is a limit to userspace
brokenness that the kernel should work around. This imo is on the other
side of the line.


  parent reply	other threads:[~2006-06-24 11:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-24  1:37 Albert Cahalan
2006-06-24  1:47 ` Linus Torvalds
2006-06-24  1:59   ` H. Peter Anvin
2006-06-24  2:11     ` Linus Torvalds
2006-06-24  2:43       ` Albert Cahalan
2006-06-24  5:20         ` H. Peter Anvin
2006-06-24 11:03         ` Arjan van de Ven [this message]
2006-06-24  1:50 ` H. Peter Anvin

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=1151146998.3181.26.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=76306.1226@compuserve.com \
    --cc=acahalan@gmail.com \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®