Re: i386 ABI and the stack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux