mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Denis Vlasenko <vda@ilport.com.ua>
To: "linux-os \(Dick Johnson\)" <linux-os@analogic.com>
Cc: "Linux kernel" <linux-kernel@vger.kernel.org>
Subject: Re: 4k stacks
Date: Wed, 28 Dec 2005 17:16:42 +0200	[thread overview]
Message-ID: <200512281716.43089.vda@ilport.com.ua> (raw)
In-Reply-To: <Pine.LNX.4.61.0512280808290.25369@chaos.analogic.com>

On Wednesday 28 December 2005 15:14, linux-os (Dick Johnson) wrote:
> >> Anyway, getting down to 20 bytes of stack-space available
> >> seems to be pretty scary.
> >
> > +       movl    %esp, %edi
> > +       movl    %edi, %ecx
> > +       andl    $~0x1000, %edi
> > +       subl    %edi, %ecx
> >
> > ecx will be equal to ?
> 
> Whatever the stack was minus that value ANDed with NOT 0x1000,
> i.e. 0x1000 minus the stack already in use. The code assumes
> that the stack starts and ends on a 0x1000 (page) boundary.
> If that's not true, then all bets are off.

Hmm. I must be thick today. (esp - (esp & 0xffffefff))
is always equal to (esp & 0x00001000). Which is either 0 or 0x1000.
--
vda

  reply	other threads:[~2005-12-28 15:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-22 21:53 linux-os (Dick Johnson)
2005-12-23  1:11 ` Grant Coady
2005-12-23 17:45   ` Alistair John Strachan
2005-12-23 12:56 ` Krzysztof Halasa
2005-12-24 12:03 ` Denis Vlasenko
2005-12-25  2:43   ` Andrew James Wade
2005-12-26  7:42     ` Andrew James Wade
2005-12-26  8:40       ` Andrew James Wade
2005-12-27 21:12         ` Frank Sorenson
2005-12-28 18:05           ` Grant Coady
2005-12-26 14:38       ` Diego Calleja
2005-12-28 13:14   ` linux-os (Dick Johnson)
2005-12-28 15:16     ` Denis Vlasenko [this message]
2005-12-30 14:45       ` linux-os (Dick Johnson)

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=200512281716.43089.vda@ilport.com.ua \
    --to=vda@ilport.com.ua \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    /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

Powered by JetHome