Re: [PATCH] i386: fix stack alignment for signal handlers

From: Linus Torvalds
Date: Wed Sep 14 2005 - 09:56:32 EST




On Wed, 14 Sep 2005, Daniel Jacobowitz wrote:
>
> The comment for the relevant bits of the GCC configuration says it won't
> assume this for x86, but I believe that comment is out of date. I think
> it'll assume 16-byte alignment on entrance to non-main() functions.

Well, that's kind of the point. We _do_ have the stack aligned on
entrance, but it looks like gcc wants it _non-aligned_. It seems to want
it offset by the "return address push" - ie it seems to expect that it was
aligned before the "call", but entry into the next function will thus
_never_ be aligned.

So the kernel actually seems to have it _too_ aligned right now.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/