mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: frodo@dereference.de (Julien Oster)
To: linux-kernel@vger.kernel.org
Subject: why does it *not* crash?
Date: Sat, 15 Feb 2003 00:08:50 +0100	[thread overview]
Message-ID: <20030214230850.GC1073@frodo.midearth.frodoid.org> (raw)


Hello!

I'm trying to understand memory management on IA-32. I already read a
lot, and also coded a lot in assembler to test some things out.

However, one thing, I just don't understand and I can't seem to find a
hint how it works.

Wenn I write a very small kernel module, which just sets ESP to
0x00000000, shouldn't the processor shut down and the mainboard reset?
But no: it causes an oops, kills the process where the error originated from
(in this case insmod, since it was loading the module) and happily
continues working as if nothing ever happened.

But how can this work? I know there are special fields in the TSS which
specify what to load ESP with in case of a privilege transition, but
there is no privilege transition since I'm already in CPL 0, or is
there?

Even the IA-32 developer's manual says, that giving ESP a value of 0 in
CPL 0 should shut down the processer, since there's no stack for
anything anymore.

So, what's the magic in Linux? :)

Thanks in advance,
Julien


                 reply	other threads:[~2003-02-14 22:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20030214230850.GC1073@frodo.midearth.frodoid.org \
    --to=frodo@dereference.de \
    --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

all inboxes | Powered by JetHome®