lkml.org 
[lkml]   [2003]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [x86] Access off the bottom of stack causes a segfault?
Date
Followup to:  <Pine.LNX.4.53.0310141510590.2211@chaos>
By author: "Richard B. Johnson" <root@chaos.analogic.com>
In newsgroup: linux.dev.kernel
>
> > main:
> > mov DWORD PTR [%ESP - 16004], %EBP # Save EBP to stack
>
> BAM **INTERRUPT** writes return address below stack-pointer.
>

Since we're in user mode, interrupts don't matter, but signals have
the same effect.

Note that this is a matter of the ABI definition. For example, in the
x86-64 ABI there is a designated region of well-defined size below
%rsp called the redzone, which signals aren't allowed to clobber.

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
If you send me mail in HTML format I will assume it's spam.
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
-
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: 2005-03-22 13:49    [W:0.221 / U:0.748 seconds]
©2003-2011 Jasper Spaans. Advertise on this site