http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-17 
14:01:51 UTC ---
It is of course fine if an interrupt uses the same stack, after all, user
interrupts do that too.  But the ABI says that 128 bytes below the %rsp are
reserved, so the interrupt code first needs to subtract 128 from %rsp before
calling any functions and must not modify that area.
You can compile with -mno-red-zone to force no red zone.
Apparently that's a flag x86_64-linux kernel uses during compilation and
therefore
probably doesn't bother to preserve the red zone during interrupts except when
creating a user interrupt:
arch/x86/Makefile has:
        KBUILD_CFLAGS += -mno-red-zone
        KBUILD_CFLAGS += -mcmodel=kernel
Thus if you are compiling Linux kernel x86_64 code or modules without
-mno-red-zone, it would be a user error.

Reply via email to