linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vincenzo Mallozzi <vinjunior@yahoo.it>
To: linux-mm@kvack.org
Subject: set_fs(), get_fs and general protection fault
Date: Sun, 22 May 2005 20:22:29 +0200 (CEST)	[thread overview]
Message-ID: <20050522182229.20451.qmail@web25609.mail.ukl.yahoo.com> (raw)

Hi all,
I'm developing a module that checkpoints thread
processes.
In order to do the checkpoint, I use get_fs() and
set_fs() instructions. The way I use them is as
follow:

checkpoint_function()
{
   fs = get_fs();
   set_fs(KERNEL_DS);

   INSTRUCTIONS TO SAVE MEMORY DESCRIPTOR

   set_fs(fs);
}

restore_function()
{
   fs = get_fs();
   set_fs(KERNEL_DS);

   INSTRUCTIONS TO RESTORE MEMORY DESCRIPTOR

   set_fs(fs);
}

When I execute checkpoint_function(), all seems to go
well. 
But when I execute restore_function, a "general
protection fault" error is returned.
If I omit the instructions get_fs and set_fs, no error
of this type is returned (but the checkpoint does not
work well).
Can anyone help me on the usage of these instructions.
I've also found some previous emails regarding them,
but I've not well understood in which way get_fs and
set_fs must be applied in my module.
I've also read some checkpoint tools, e.g. CRACK, in
which they are used in about the same way I do it.
Thanks.
Vincenzo Mallozzi.


		
___________________________________ 
Nuovo Yahoo! Messenger: E' molto piu divertente: Audibles, Avatar, Giochi, Rubrica? Scaricalo ora! 
http://it.messenger.yahoo.it

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

                 reply	other threads:[~2005-05-22 18:22 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=20050522182229.20451.qmail@web25609.mail.ukl.yahoo.com \
    --to=vinjunior@yahoo.it \
    --cc=linux-mm@kvack.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