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

--- Comment #6 from Lee Merrill <merrill_707_1 at yahoo dot com> 2011-05-17 
13:29:56 UTC ---
(In reply to comment #5)
> Yeah, 128 bytes below %rsp can be freely used on x86_64, interrupts must not
> clobber those.

I should have mentioned that this is kernel driver code, so then the interrupt
does not change privilege level, and a stack switch will not occur. When an
interrupt happens, the flags / cs / ip are stored at the next 24 bytes of
stack, overwriting the variables in view here. I've seen this happen on a
standard Suse 10 x86_64 Linux machine, so this would not be just theoretical...

Reply via email to