lkml.org 
[lkml]   [2006]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateFri, 23 Jun 2006 18:59:09 -0700
From"H. Peter Anvin" <>
SubjectRe: i386 ABI and the stack
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-24 04:02    [from the cache]
©2003-2010