linux-um archives
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade@yahoo.it>
To: Gerd Knorr <kraxel@bytesex.org>, Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] uml-general-protection-fault even more kludgy but mergeable
Date: Tue, 17 May 2005 00:05:43 +0200	[thread overview]
Message-ID: <200505170005.43629.blaisorblade@yahoo.it> (raw)

About 2.6.11-rc4/uml-general-protection-fault:

Ok, today I was looking a bit more to this patch and I even looked in the 
Intel manuals.

I effectively verified that, in case of a page fault (do_page_fault) the 
kernel only sends a SIGSEGV to the process if (error_code & 4 != 0), as 
expected.

So, if (!(error_code & 4)), we cannot be handling a page fault at all.

However, the comment in the patch is a bit misleading (or misleaded) because 
error_code has a different format for everything else than protection faults. 
(See section 5.13, Error code, of manual "Intel System Programming Guide - 
253668 -15.pdf", order number 253668-15).

In that case, in fact, it will be unused (and hence, probably, set to 0) when 
the error code references the IDT descriptor, it will be clear when the GDT 
is referenced, it will be set when the LDT is referenced (always by the error 
code).

So, in practice, it's correct to call bad_segv() as done in the patch, but we 
miss some cases. Only this time I've verified this well enough that I feel we 
could merge your patch. However, I've not found any possible *realistic* 
source of general protection faults. Especially I didn't find what expected 
(i.e. I/O errors).
-- 
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade





-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

             reply	other threads:[~2005-05-16 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-16 22:05 Blaisorblade [this message]
2005-05-17 10:03 ` [uml-devel] Re: uml-general-protection-fault even more kludgy but mergeable Gerd Knorr
2005-05-17 10:24   ` Bodo Stroesser
2005-05-17 10:59     ` Gerd Knorr

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=200505170005.43629.blaisorblade@yahoo.it \
    --to=blaisorblade@yahoo.it \
    --cc=jdike@addtoit.com \
    --cc=kraxel@bytesex.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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