From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Albert Cahalan <acahalan@gmail.com>,
linux-kernel@vger.kernel.org, 76306.1226@compuserve.com,
ak@muc.de, akpm@osdl.org
Subject: Re: i386 ABI and the stack
Date: Fri, 23 Jun 2006 18:59:09 -0700 [thread overview]
Message-ID: <449C9C6D.7050905@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0606231844460.6483@g5.osdl.org>
Linus Torvalds wrote:
>
> We always have. It's the x86 ABI.
>
> 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.
>
> Linus
>
> (*) That "128 byte" is from memory. Maybe it's bigger.
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.
Unlike other enhancements that have been proposed to the i386 ABI (like
regparm), this has the advantage of being fully backwards-compatible
with old binaries and libraries. As long as you have a kernel that
knows to preserve the redzone, then you can use the new -mredzone
option, but you cross-call classical ABI functions without any problems,
and old ABI programs won't even notice.
-hpa
next prev parent reply other threads:[~2006-06-24 1:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-24 1:37 i386 ABI and the stack Albert Cahalan
2006-06-24 1:47 ` Linus Torvalds
2006-06-24 1:59 ` H. Peter Anvin [this message]
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
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=449C9C6D.7050905@zytor.com \
--to=hpa@zytor.com \
--cc=76306.1226@compuserve.com \
--cc=acahalan@gmail.com \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--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