public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [x86] Access off the bottom of stack causes a segfault?
Date: 14 Oct 2003 13:43:37 -0700	[thread overview]
Message-ID: <bmhn5p$oba$1@cesium.transmeta.com> (raw)
In-Reply-To: Pine.LNX.4.53.0310141510590.2211@chaos

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

  reply	other threads:[~2003-10-14 20:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-14 18:31 [x86] Access off the bottom of stack causes a segfault? Chris Lattner
2003-10-14 18:37 ` Davide Libenzi
2003-10-14 19:00   ` Chris Lattner
2003-10-14 18:45     ` Davide Libenzi
2003-10-14 19:28     ` Richard B. Johnson
2003-10-14 19:48       ` Chris Lattner
2003-10-17 23:55         ` Jamie Lokier
2003-10-14 20:47     ` Mikael Pettersson
2003-10-14 18:42 ` Brian Gerst
2003-10-14 18:49 ` Chris Lattner
2003-10-14 18:42   ` Petr Vandrovec
2003-10-14 19:02     ` Chris Lattner
2003-10-14 19:18 ` Richard B. Johnson
2003-10-14 20:43   ` H. Peter Anvin [this message]
2003-10-17  0:23 ` Eric W. Biederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='bmhn5p$oba$1@cesium.transmeta.com' \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox